Hi, On 2 Dez., 10:30, Kei Suzuki <[EMAIL PROTECTED]> wrote: > (meta #^{:v 1} (vector 1)) > > Is this by design?
I think you are right. The metadata is assigned to the list (vector 1). Then the function vector is executed and you get the vector [1], but the metadata is "lost". So one could argue, the metadata should be transferred. However, how do you want to do this consistently? Consider (meta #^{:v 1} (fn [] 1)). The metadata is assigned to the list (fn ...). But why should it transfer the metadata to the return value of the function? And indeed this is not possible, because it's a number. Should vector, set and friends behave differently? I think the point about *reader* macros is, that they happen at *read* time. However, the call to vector happens at run-time. So in that case one has to use with-meta. One really has to be aware of the different times when things happen: - reader macros => read time - macros => compile time - functions => run-time Sincerely Meikel --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---