Re: === again (sorry)

2008-11-13 Thread Mike Cowlishaw
The indexOf and lastIndexOf methods are new in ES3.1, and are the only methods in the entire spec that depend on ===. Strictly speaking that's true, but only because the switch statement is not a method. switch statements depend on ===. There was a recently reported bug for

RE: === again (sorry)

2008-11-13 Thread Allen Wirfs-Brock
. -Original Message- From: [EMAIL PROTECTED] [mailto:es-discuss- [EMAIL PROTECTED] On Behalf Of Igor Bukanov Sent: Thursday, November 13, 2008 9:18 AM To: Waldemar Horwat Cc: Mark S. Miller; es-discuss Subject: Re: === again (sorry) 2008/11/11 Waldemar Horwat [EMAIL PROTECTED]: Mark S. Miller wrote

Re: === again (sorry)

2008-11-10 Thread Waldemar Horwat
Mark S. Miller wrote: The indexOf and lastIndexOf methods are new in ES3.1, and are the only methods in the entire spec that depend on ===. Strictly speaking that's true, but only because the switch statement is not a method. switch statements depend on ===. Waldemar

Re: === again (sorry)

2008-11-03 Thread David-Sarah Hopwood
Erik Arvidsson wrote: I see a small risk with changing this. Array.prototype.indexOf is widely emulated in IE and is also used a lot in browser that support it. If it is emulated, then the emulation will replace the ES3.1 version, so there can be no compatibility problem in that case. Overall

Re: === again (sorry)

2008-11-03 Thread Mike Cowlishaw
Re: === again (sorry) I see a small risk with changing this. Array.prototype.indexOf is widely emulated in IE and is also used a lot in browser that support it. This change would cause issues with NaN and -0. However I don't think that changing these 2 edge cases would lead to too many

Re: === again (sorry)

2008-11-03 Thread David-Sarah Hopwood
Maciej Stachowiak wrote: On Nov 3, 2008, at 11:34 AM, David-Sarah Hopwood wrote: Erik Arvidsson wrote: I see a small risk with changing this. Array.prototype.indexOf is widely emulated in IE and is also used a lot in browser that support it. If it is emulated, then the emulation will replace

Re: === again (sorry)

2008-11-03 Thread Maciej Stachowiak
On Nov 3, 2008, at 6:54 PM, David-Sarah Hopwood wrote: Maciej Stachowiak wrote: On Nov 3, 2008, at 11:34 AM, David-Sarah Hopwood wrote: Erik Arvidsson wrote: I see a small risk with changing this. Array.prototype.indexOf is widely emulated in IE and is also used a lot in browser that

Re: === again (sorry)

2008-11-02 Thread Erik Arvidsson
I see a small risk with changing this. Array.prototype.indexOf is widely emulated in IE and is also used a lot in browser that support it. This change would cause issues with NaN and -0. However I don't think that changing these 2 edge cases would lead to too many serious issues.

=== again (sorry)

2008-10-31 Thread Mark S. Miller
According to the ES3.1 spec and the behavior of at least FF3.0.3 [4, -0, 0, NaN, 8].indexOf(0); // yields 1 [4, -0, 0, NaN, 8].indexOf(NaN); // yields -1 This is because indexOf and lastIndexOf are specified in terms of === rather than SameValue. Is there any reason not to consider this