I have a hard time understanding the rules for the evaluation of the
metadata in the reader. Following example illustrates this:
(let [x :foo
v1 (quote ^{x 4} [1 2 3])
v2 ^{x 4} [1 2 3]]
(println (meta v1) v1)
(println (meta v2) v2))
prints
{x 4} [1 2 3]
{:foo 4} [1 2 3].
Is it a desired behavior that reader is influenced by whether it reads
inside a quoted form? Even strangely,
(let [x :foo
v1 (quote ^{x 4} [])
v2 ^{x 4} []]
(println (meta v1) v1)
(println (meta v2) v2))
prints
nil []
{:foo 4} []
Best,
JW
--
--
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.