Separating a Hash type from Object

Brendan Eich brendan at mozilla.org
Wed May 30 15:11:42 PDT 2007


On May 30, 2007, at 2:32 PM, Brendan Eich wrote:

> Good point -- we talked about this (it came up on python-dev too, for
> the same reason), but I forgot to note that the way
> intrinsic::hashcode is specified allows for a!==b but
> intrinsic::hashcode(a)===intrinsic::hashcode(b). So in Newton in
> April, we agreed face-to-face that all NaNs could hash to 0 (if
> memory serves). This avoids hardship computing disting codes on each

Typo: "distinct codes", of course.

> NaN presented as input, but it doesn't help retrieval or bound table
> space.
>
> We did not talk for long about throwing an exception for
> intrinsic::hashcode(NaN), but we certainly could do that. IIRC that's
> what Python does/will-do. Comments?
>
> /be
>
> _______________________________________________
> Es4-discuss mailing list
> Es4-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es4-discuss




More information about the Es4-discuss mailing list