July 26, 2012 TC39 Meeting Notes

David Bruant bruant.d at gmail.com
Fri Aug 3 17:18:04 PDT 2012

Le 03/08/2012 20:03, Brendan Eich a écrit :
> I think I buy this *if* we spec WeakSet and require it (and only it, 
> not a trickster impersonator) as the optional third argument. And of 
> course it's a live set.
> Alternative: take any arraylike and treat it as a descriptor, not 
> live, whose elements are copied into an internal weak set. Your 
> example never adds to the privateNameSet after it is created. What is 
> the live update use-case?
It's the same use case than the one of adding new private properties to 
an object dynamically (not only at object creation time).
I admit I have no specific use case in mind, but if it's possible to add 
new private properties to an object at any time, it should be possible 
to add new private names to the privateNameSet at any time. Otherwise, 
the unknownPrivateName trap is called and either the proxy forwards 
without trapping, potentially losing some bits of information or the 
proxy throws and distinguishes itself from an object.


More information about the es-discuss mailing list