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. <jackalm...@gmail.com> wrote: > >> On Thu, Dec 4, 2014 at 9:46 PM, Katelyn Gadd <k...@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. > > ~TJ >
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss