On Nov 12, 2011, at 9:19 AM, Allen Wirfs-Brock wrote: > 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.
WeakRef != WeakMap, we keep running into confusion between the two. WeakRefs are useful for systems-builders. They should not be exposed to unprivileged code. Is there an object-capability security model that would work on the web, by which "frameworks" with some higher degree of trust could be introduced to WeakRef as a capability, while ordinary web content could not access WeakRef at all? I don't know of such a model, but perhaps Mark has ideas. /be
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

