WeakMaps question ?
allen at wirfs-brock.com
Sat Nov 12 09:19:48 PST 2011
On Nov 12, 2011, at 5:10 AM, Russell Leggett wrote:
> 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.
What you are asking for is a "weak array" (or an array of "weak references"). While some people think that such things have utility others are concerned that they expose GC based non-determination which they don't want to allow into the language.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss