Just because it's metadata doesn't mean it won't get evaluated. Consider
the following:
(set! *print-meta* true)
(defmacro defmeta [name meta value]
`(def ~(with-meta name meta) ~value))
(macroexpand '(defmeta foo {:key a} 42))
;;=> (def ^{:key a} foo 42)
(defmeta foo {:key a} 42)
;; CompilerException java.lang.Exception:
;; Unable to resolve symbol: a in this context
(defmeta foo {:key 'a} 42)
^{:key a, ...} #'user/foo
Also, look at the source of the defn macro, which quotes the arglist during
its expansion.
-Stuart Sierra
clojure.com
--
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