> And in this case Closure compiler behave itself also unpredictably and
> quite the contrary:
> Where it must evaluate a symbol (like in this case), it doesn't.

Symbols need to be namespace resolved in order to be evaluated
properly.  This is something you need to be aware of, but it is not
unpredictable or contrary to any documentation.  And again, in this
case, the evaluation of the plus symbol does not happen at macro
expansion, it happens at run time.  The behavior here is the same
inside of and outside of a macro:

user=> (def e '(5 + 2))
#'user/e
user=> (eval `((nth '~e 1) (nth e 0) (nth e 2)))
2
user=> (eval `((nth (list ~@e) 1) (nth e 0) (nth e 2)))
7

> Where it mustn't evaluate a symbol (argument of macro), it does.

This has already been shown in several responses, the argument is not
being evaluated in macro expansion, it is being evaluated at runtime.
Using macroexpand will help you to see what the expanded forms look
like and what namespace symbols are resolved to.

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

Reply via email to