Metadata fields proliferate throughout the standard Clojure value and 
reference types. It seems odd that one would suggest that this seemingly 
well supported feature should not be taken advantage of except in very 
narrow circumstances. What is the rationale for such robust support for 
runtime metadata if their usage should be restricted primarily to 
compile-time or metaprogramming tasks? If that was the primary purpose, 
certainly a Common Lisp proclaim/declaim/declare-esque expression would be 
preferable since then the compiler and macros can take advantage of this 
information when reading forms without having to extract data out of 
symbols on an ad-hoc basis. It makes me think maybe we're missing the point 
here. Rich Hickey clearly carefully designed Clojure to support varied uses 
of runtime metadata on Clojure objects. 

On Friday, January 30, 2015 at 1:28:04 PM UTC-5, Stuart Sierra wrote:
>
> Almost never.
>
> Seriously, anything important enough to be included in your program's 
> input or output is almost certainly important enough to be *data*, not 
> metadata. And the non-equality-checking semantics of metadata are confusing.
>
> About the only place I've found metadata to be worthwhile is 
> meta-programming namespaces and Vars, e.g. what clojure.test does.
>
> My personal rule of thumb is: if you strip all the metadata from your 
> program it should still work, thought maybe less efficiently.
>
> –S
>
>
> On Thursday, January 29, 2015 at 10:10:34 AM UTC-5, Jonathon McKitrick 
> wrote:
>>
>> Is there a rule of thumb or set of use cases when metadata is a more 
>> elegant solution than simply adding more entries to a map or record?
>>
>

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
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 clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to