Mark S. Miller erights at
Sat Nov 3 23:06:27 PDT 2012

On Sat, Nov 3, 2012 at 10:13 PM, Axel Rauschmayer <axel at> wrote:

> (I am still sad we did not fix indexOf, lastIndexOf, and switch when we
> arguably had the chance.)
> Can you elaborate? We don’t have the chance, any more? Would anything
> break (or did, in tests)?

I am not aware of anyone gathering any evidence one way or the other about
what breakage this might cause. So it is not necessarily too late. If
someone does gather actual evidence that the breakage would be small
enough, I could see us reconsider this. But I doubt we would revisit in the
absence of such evidence.

> How about only letting those methods find NaN, while letting them consider
> +0 and -0 equal?

In one way, that would be a big improvement on the status quo: such a rule
would still form an equivalence class. (By contrast, === does not form an
equivalence class since it is not reflexive.)

OTOH, it would make for yet a fourth built-in equality-like test. I don't
think the payoff is worth the complexity.

> Axel
> --
> Dr. Axel Rauschmayer
> axel at
> home:
> twitter:
> blog:

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list