Re: Calling macros by var

2010-10-01 Thread Phil Hagelberg
On Thu, Sep 30, 2010 at 11:09 PM, Konrad Hinsen wrote: > On 01.10.2010, at 03:07, Phil Hagelberg wrote: >> I suspect the answer may just be "yeah... that's not something you >> should do with macros", but I'm curious. I suppose the compiler only >> checks the :macro metadata when it's literally in

Re: Calling macros by var

2010-09-30 Thread Konrad Hinsen
On 01.10.2010, at 03:07, Phil Hagelberg wrote: > I suspect the answer may just be "yeah... that's not something you > should do with macros", but I'm curious. I suppose the compiler only > checks the :macro metadata when it's literally in the call position > rather than when there's indirection th

Calling macros by var

2010-09-30 Thread Phil Hagelberg
So I noticed some curious behaviour: (defmacro foo [body] {:env &env :form &form :body body}) => #'user/foo (#'user/foo :body) => java.lang.IllegalArgumentException: Wrong number of args (1) passed to: user$foo (NO_SOURCE_FILE:0) (#'user/foo :form :env :body) => {:env :en