> I cannot think of an easy way around this at the moment.

I've browsed through the namespace documentation and I think that I
can get by with the (ns-resolve) form.  I feel it could be more
concise and elegant, though.

> I'm curious
> what the reasoning behind creating this temporary namespace is?
>
> There may be a different approach that won't get you caught up between
> the compilation/execution phases.

As I've mentioned in my first post, I'm coding a function that finds
functions with a certain metadata field within namespaces I pass on to
it.  To test it, I want to set up namespaces with minimal stuff for
testing, namespaces that I want to throw away once the test is passed.

My problems don't seem to stop at referencing the stuff I put in these
temporary namespaces.  It also seems that the (defn) macros that I
expected would define mappings in the temporary namespaces expand
before the execution of the test function.  This means that these
definitions don't go in the temporary namespaces, but in the same
namespace as the test function itself.  The only way that I've found
yet to effectively put these defn's in the temp namespaces is to wrap
them in quoted-lists and invoke eval:

(eval '(defn fn-a [] :a/a))

The posts I got to read last week with regards to eval suggested it
was bad style.  Is there a more elegant way to do this?

Benoit
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to