Are Private name and Weak Map the same feature? and the Assoc API
bruant.d at gmail.com
Wed Dec 21 04:52:32 PST 2011
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.
More information about the es-discuss