Nice idea, but there seems to be (some) complications. > Set **this** to *T*.
What is `this` specifically? As far as I can see, it is a value and not a reference. And even if it were a reference, setting it to point to another object does not affect the other references which point to the old WeakSet. On Tue, Oct 28, 2014 at 11:48 PM, Isiah Meadows <[email protected]> wrote: > I'm proposing simply initializing a new instance and GC'ing the old > instance entirely (updating the `this` to point to the new) instead of > the current algorithm of maintaining a list of keys. I know that it > potentially slow down the method itself, but it could eliminate the > need for keeping a Map-like index of keys. > > I know that this is kinda on the late side for such drastic internal > spec changes, but might fix the problem of indexing WeakMap and > WeakSet entries > > Link to formal proposal: > https://github.com/impinball/weakmap-weakset-clear > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

