On Dec 3, 4:15 am, lazy1 <[email protected]> wrote:
> Hello,
> What is the right way to do this?

As people have mentioned, new is a special form which evaluates it's
arguments at
compile time and cannot be used with a dynamic class name.

Fortunately you can use the reflection API and create instance of your
class
 using the newInstance method.

(defn new-container
  [type]
  (.newInstance (*containers* type)))


- sean

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
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