On Nov 11, 2011, at 6:55 PM, Allen Wirfs-Brock <[email protected]> wrote:

> 
> On Nov 11, 2011, at 3:39 PM, Oliver Hunt wrote:
> 
>> A weak map can only remove an entry if both the key and value have died, in 
>> many ES implementations a number of the primitives are not gc allocated and 
>> so can never die, or are cached globally so have lifetime unrelated to any 
>> given program.
> 
> Yes, but this isn't just an implementation decision. The primitive values 
> have existential identify (my term,  philosophers may mean something else).  
> All such values conceptually exist for all time, regardless of whether or not 
> an instance of a particular value is actually instantiated an any particular 
> point in time. 

Regardless of the implementation of primitive values, couldn't we say that the 
semantics of a weak map ignore primitive keys and look only at the value. 
Primitive keys are exceptionally common for maps, and this would open up a lot 
of potential uses, especially regarding caching.

> 
> Allen
> _______________________________________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to