Re: Evaluation of metadata by reader

2013-07-25 Thread Jozef Wagner
Hi, I was just going to post exactly the same. I've looked in the Compiler.java and the evaluation of metadata happens together with evaluation of the form. So it is a desired behavior after all. Regarding empty vector, I've already created a ticket for it, http://dev.clojure.org/jira/browse/C

Re: Evaluation of metadata by reader

2013-07-25 Thread Meikel Brandmeyer (kotarak)
Hi, my understanding is, that the metadata is evaluated when the literal is evaluated. In the first case this means to just strip the surrounding quote. So nothing happens to the metadata. In the second case upon evaluation the literal vector is traversed and its elements are evaluated. During

Re: Evaluation of metadata by reader

2013-07-25 Thread Jozef Wagner
Your post is nice but does not at all talk about the issue I am presenting. I know metadata is attached to the form reader reads and not to the evaled result of that form. My issue is of the evaluation of the metadata map itself. Best, Jozef On Thursday, July 25, 2013 2:50:38 AM UTC+2, spencer

Re: Evaluation of metadata by reader

2013-07-24 Thread spencer
I wrote a blog post about this last year: http://spencertipping.com/posts/2012.0819.clojure-metadata.html On Wednesday, July 24, 2013 3:09:11 PM UTC-7, Jozef Wagner wrote: > > I have a hard time understanding the rules for the evaluation of the > metadata in the reader. Following example illustr

Evaluation of metadata by reader

2013-07-24 Thread Jozef Wagner
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].