Brendan Eich (2014-01-07T16:05:37.000Z)
Andreas Rossberg wrote:
>>> Lacking true integers, that would break JavaScript's poor man's
>>> >>  emulation of arrays.
>> >
>> >  C'mon, that's not the reason. Hardly anyone generates-0  as an index and
>> >  expects it to index a[0] for some array a. Things to complain about!:-P
>
> It's not all that difficult to accidentally create a-0  when you do
> pure "integer" arithmetic with floats. I'm pretty sure it would be a
> major pitfall. Wasn't that the reason why we changed Map?

Maybe, and I'm not thrilled about that change, but Map is new, and 
different from Array or array-likes anyway (value to value mapping).

My point was Array indexing is the least of our concerns. Changing 
(-0).toString() will probably break tons of code, including numeric form 
code, even if only showing "-0" to users who want "0".

/be
domenic at domenicdenicola.com (2014-01-09T16:38:59.339Z)
Andreas Rossberg wrote:

> It's not all that difficult to accidentally create a `-0` when you do
> pure "integer" arithmetic with floats. I'm pretty sure it would be a
> major pitfall. Wasn't that the reason why we changed `Map`?

Maybe, and I'm not thrilled about that change, but `Map` is new, and 
different from `Array` or array-likes anyway (value to value mapping).

My point was `Array` indexing is the least of our concerns. Changing 
`(-0).toString()` will probably break tons of code, including numeric form 
code, even if only showing `"-0"` to users who want `"0"`.