Re: suggest to have defn/new/throw/etc.. allow evaluating ...maybe?

2013-02-25 Thread AtKaaZ
Thank you very much Tim. I will use the eval one with thrown? On Mon, Feb 25, 2013 at 6:49 AM, Tim Reinke t...@mostcallmetim.com wrote: It's nice to see some input validation! It seems your problem, ultimately, is the testability of macros. You can wrap the call to the macro in an eval

Re: suggest to have defn/new/throw/etc.. allow evaluating ...maybe?

2013-02-24 Thread Tim Reinke
It's nice to see some input validation! It seems your problem, ultimately, is the testability of macros. You can wrap the call to the macro in an eval (this way the error is thrown by eval, not the compiler): (is (thrown? AssertionError (eval '(dedefn (str a b) This can get a little

suggest to have defn/new/throw/etc.. allow evaluating ...maybe?

2013-02-23 Thread AtKaaZ
= *(defn (symbol (str a b)) [x] x)* IllegalArgumentException First argument to defn must be a symbol clojure.core/defn (core.clj:277) maybe allow ~ like this: =* (defn ~(symbol (str a b)) [x] x)* IllegalArgumentException First argument to defn must be a symbol clojure.core/defn (core.clj:277) to