Removal of WeakMap/WeakSet clear
inglor at gmail.com
Mon Dec 8 17:05:38 PST 2014
Never been a need?
Why if you want to use objects as keys and not use reference equality? We've been over this.
Here's a ref https://mail.mozilla.org/pipermail/es-discuss/2014-February/036389.html
> On Dec 8, 2014, at 23:46, Tab Atkins Jr. <jackalmage at gmail.com> wrote:
>> On Thu, Dec 4, 2014 at 9:46 PM, Katelyn Gadd <kg at luminance.org> wrote:
>> I'm surprised to hear that JS runtimes don't necessarily have ways to
>> 'hash' a given JS value, but it makes sense. I can see how that is a
>> great reason for 'get me a hash for this value' to never actually
>> exist in the API, even if it's unfortunate that I have to recreate
>> that facility myself in runtimes that do have it.
> JS has maps/sets that take objects natively, hiding any details about
> how a mutable object is tracked/stored as keys or values, so there's
> never been any need for such a thing. Explicitly exposing hash codes
> is leaking implementation details into the user-facing API.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss