On Feb 14, 2013, at 1:27 PM, AtKaaZ wrote:

> The goal is to can write this form:
> => (let [a java.lang.RuntimeException]
>      (new a)
>      )
> CompilerException java.lang.IllegalArgumentException: Unable to resolve 
> classname: a, compiling:(NO_SOURCE_PATH:2:3) 
> 
> attempt with macro:
> => (defmacro mew [cls & restt]
>      `(new ~(eval cls) ~@restt)
>      )
> #'runtime.q/mew

This is probably your closest attempt.  Try this variation on the above:

(defmacro mew [cls & args]
  `(new ~cls ~@args))

user=> (macroexpand-1 '(mew java.lang.RuntimeException))
(new java.lang.RuntimeException)

Andy

-- 
-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to