Use cases for WeakMap

Brendan Eich brendan at mozilla.com
Mon May 16 00:12:37 PDT 2011


On May 16, 2011, at 12:01 AM, Brendan Eich wrote:

> On May 15, 2011, at 11:55 PM, Erik Corry wrote:
> 
>> 2011/5/16 Brendan Eich <brendan at mozilla.com>:
>>> Not if the object is frozen.
>> 
>> That shouldn't prevent you adding private names.  See earlier message
>> in this thread.
> 

> Frozen means [[Extensible]] is false, so you can't add any properties, ...

I'll go further: frozen means the implementation should be free to move the object and anything associated with its shallow-frozen key/value state into read-only memory, so the full force of 50-year-plus OS and hardware MMU protection can ensure [[Extensible]] really is false.

/be



More information about the es-discuss mailing list