> So I think the source of the exception is clear, but have you found a
> solution to your original problem? Maybe if you expand on that someone
> can describe a good technique.
I'm using clojure-contrib's ns-utils/ns-vars and find-namespaces/find-
namespaces-on-classpath to discover namespaces a
2010/1/10 Nicolas Buduroi :
> That was it, thanks a lot.
Ah great. My understanding is that type meta data should go on the
object not the var, but that integers for example do not support meta
data as they are java objects. Only things like vectors and hash maps
do. So you can not set an integer
> The macro works fine. The problem is that the REPL tries to print the
> result (which is the var you created) and the print multimethod does
> not know what to do with your custom type, and the default method
> throws an exception.
That was it, thanks a lot.
- budu
--
You received this messag
Hi Nicolas,
The macro works fine. The problem is that the REPL tries to print the
result (which is the var you created) and the print multimethod does
not know what to do with your custom type, and the default method
throws an exception.
user=> (defbar fuz (+ 1 1))
java.lang.ClassCastException: c
Hi, I'm using macros to define special vars (w/ a keyword as type) to
retrieve them later with ns-utils/ns-vars and filter them. I don't
know if this technique is recommended or if there's some better way to
achieve this, but there's something weird happening when we try to
evaluate the var defined