Tab Atkins Jr. wrote:
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.
Not necessarily an implementation leak. It's really an implementation
constraint, or set of constraints, that can be specified. See ye olde
http://wiki.ecmascript.org/doku.php?id=proposals:hashcodes
including important safety tip
http://wiki.ecmascript.org/doku.php?id=proposals:hashcodes#a_note_regarding_security
Why might this come to ES7 or beyond?
https://esdiscuss.org/topic/maps-with-object-keys
especially https://esdiscuss.org/topic/maps-with-object-keys#content-5
See also
https://esdiscuss.org/topic/fwd-friam-fwd-hash-collision-denial-of-service
-- have to avoid DoS attacks in any hashcode implementation.
/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss