WeakMap better than Private Symbols? (was: direct_proxies "problem")

David Bruant bruant.d at gmail.com
Thu Jan 10 08:46:32 PST 2013


Le 10/01/2013 17:41, Brendan Eich a écrit :
> Nathan Wall wrote:
>> In the case of (1), the implementation using a private symbol will 
>> have internal accesses to the `timestamp` symbol exposed through the 
>> unknownPrivateSymbol trap.
>
> Private symbols do not trap.
They do trap, but they don't leak.

>> In the case of (2), the implementation using a private symbol will 
>> fail on a call to `setTime` when the object is frozen (I think).
>
> Nope, we agreed that frozen objects support setting pre-existing 
> (added before the object was made non-extensible) properties named by 
> private symbols.
I said the opposite in my answe, my mistake. I wasn't aware of that.

David


More information about the es-discuss mailing list