Since there seems to be interest in the exact mechanics:

For every special form there exists a subclass of Expr in the clojure
compiler, which represents the special form in the analysis result. Every
such class directly implements the behavior of the special form in terms of
compiler infrastructure. Namely a method .eval to evaluate a
runtime-compiled form and a method .emit to emit its bytecode.

def is represented as DefExpr. It does evaluation of its meta data here
https://github.com/clojure/clojure/blob/c77e5bd87dfb6ca55612c842ec5ed80ff6319866/src/jvm/clojure/lang/Compiler.java#L412

and here
https://github.com/clojure/clojure/blob/c77e5bd87dfb6ca55612c842ec5ed80ff6319866/src/jvm/clojure/lang/Compiler.java#L439

for regular operation and AOT respectively.

So there is something special about def (it's a special form, not a macro)
For the case of (meta ^{:foo "bar"} ["a" "vec"]) look up MetaExpr in the
compiler. That seems to be how values carrying metadata are handled.

hope that clears everything up

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
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
--- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to