Begin forwarded message:

cgrand asked:

>
> I forgot to ask you: afaik, fns don't support metadata, is it by  
> design?
>


The original and 'pure' notion of metadata was only for value types,  
specifically:

(with-meta x new-meta)

should not affect x.

It's becoming obvious that metadata is desired for many of the  
reference types. It exists for Vars, and has been requested for  
namespaces and fns, and would be useful on Refs and Agents too.

Doing this soundly will require a new variant of with-meta for  
reference types (destructive, atomic, alter-meta), and a rejiggering  
of the IObj interface hierarchy, splitting the metadata reading from  
the writing, so all metadata can still be accessed with meta and ^.

It will also have to be understood that metadata will be for fn  
closures only, not IFns in general, as things like maps are already  
both IFn and IObj.

Rich


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to