Re: Metadata for Any Object

2009-04-30 Thread Mark Engelberg
On Thu, Apr 30, 2009 at 9:46 AM, Rich Hickey wrote: > However, there isn't a list, and metadata propagation could use an > audit. If there's a specific case where you think it should and it > doesn't please let me know. I think it just took me a while to figure out that cons does not preserve me

Re: Metadata for Any Object

2009-04-30 Thread Rich Hickey
On Apr 30, 12:34 pm, Mark Engelberg wrote: > On Thu, Apr 30, 2009 at 6:01 AM, Rich Hickey wrote: > > Then, you need to know which operations require metadata propagation. > > That's built into the Clojure data structures but can't be retrofitted > > to arbitrary types. > > Is there a list of w

Re: Metadata for Any Object

2009-04-30 Thread Mark Engelberg
On Thu, Apr 30, 2009 at 6:01 AM, Rich Hickey wrote: > Then, you need to know which operations require metadata propagation. > That's built into the Clojure data structures but can't be retrofitted > to arbitrary types. Is there a list of which operations propagate metadata? I know I've been sur

Re: Metadata for Any Object

2009-04-30 Thread Rich Hickey
On Apr 30, 1:41 am, Laurent PETIT wrote: > Hi, > > 2009/4/30 Stuart Sierra : > > > > > On Apr 29, 5:58 pm, Stu Hood wrote: > >> Instead of attaching the metadata directly to the object, what if the > >> metadata was stored outside the object, in a global map of {object > >> metadata, > >> ...

Re: Metadata for Any Object

2009-04-29 Thread Laurent PETIT
Hi, 2009/4/30 Stuart Sierra : > > On Apr 29, 5:58 pm, Stu Hood wrote: >> Instead of attaching the metadata directly to the object, what if the >> metadata was stored outside the object, in a global map of {object metadata, >> ...}? In order to handle garbage collection, something similar to Java

Re: Metadata for Any Object

2009-04-29 Thread Stuart Sierra
On Apr 29, 5:58 pm, Stu Hood wrote: > Instead of attaching the metadata directly to the object, what if the > metadata was stored outside the object, in a global map of {object metadata, > ...}? In order to handle garbage collection, something similar to Java's > WeakHashMap could be used, with t

Metadata for Any Object

2009-04-29 Thread Stu Hood
Hey gang, Metadata support for pure Java objects is not currently supported, because it requires a modification to the object. Additionally, only some Clojure objects support metadata, due to the necessity of implementing the IMeta interface. This can be confusing for new users, and eliminates som