Are Private name and Weak Map the same feature? and the Assoc API

Andreas Rossberg rossberg at
Wed Dec 21 05:02:14 PST 2011

On 21 December 2011 13:52, David Bruant <bruant.d at> wrote:
> Le 21/12/2011 13:47, Andreas Rossberg a écrit :
>> In particular, I don't consider the
>> above example a good idea in real code, with or sans proxies. You
>> shouldn't go off mutating arbitrary objects, and it won't work with
>> non-extensible objects anyway (at least that's what I gather as the
>> current state of discussion regarding private names and freezing). A
>> map seems far more adequate for that.
> Of course. The only purpose of this example was to show that an
> equivalent leak could occur without the specific use of 'this'. I don't
> know to what extent this code was interesting or if it could have been
> implemented more efficiently or more expressively.

Yes, I reckoned. I only pointed this out because I was assuming that
Sam assumed (based on his reply) that you were thinking of it as an
important example. :)


More information about the es-discuss mailing list