On Nov 7, 3:48 pm, Stuart Halloway <[EMAIL PROTECTED]> wrote:
> The following macro in lancet defines an ant task.
>
>    (defmacro define-ant-task [task-name]
>      `(def ~(symbol task-name) (create-ant-task ~task-name)))
>
> (At least) one of the following assumptions is wrong:
>
> (1) define-ant-task needs to be a macro so it can drop args into def.
>
> (2) define-ant-task needs to be a function because task-name needs to
> be evaled on the way in.
>
> (3) using eval (which would solve the contradiction in 1 & 2) is evil
> and should be avoided.
>
> On a quick look through boot.clj and other places I don't see any
> other macros that deal with this issue, which makes me think there is
> some totally different way to approach the problem.
>
> Suggestions?
>

It's common for people to post only their macros, but actually more
useful to (additionally) post:

What I'd like to say (what a usage would look like)

What I'd like that to expand into

Doing so can greatly clarify things. For instance it's not clear to me
what you will be passing to define-ant-task if not a symbol, so I
don't understand the call to symbol inside.

Rich

--~--~---------~--~----~------------~-------~--~----~
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