Alex Kocharin (2013-12-23T02:17:52.000Z)
23.12.2013, 05:59, "Brendan Eich" <brendan at mozilla.com>:
> Alex Kocharin wrote:
>
>>  Object.is() looks like a perfect function for checking oddballs (-0,
>>  NaN) if you want to represent an arbitrary data correctly. In that
>>  case distinguishing signed zeroes is a big plus
>
> or absolutely required.
>
>>  (making (-0).toString() === '-0' would be better though).
>
> (Not backward compatible -- no one is going to risk this for so little
> gain.)

That's something I never really understood when I was reading ES5 spec, where -0 is a special case, and a sole reason why `x === Number(String(x))` is not true for all numbers.

Why isn't it stringified as "-0"? How did that happen? Do somebody really check if something is less than zero using "-" in string representation?
domenic at domenicdenicola.com (2014-01-06T13:59:28.443Z)
23.12.2013, 05:59, "Brendan Eich" <brendan at mozilla.com>:
> Alex Kocharin wrote:
>>  (making `(-0).toString() === '-0'` would be better though).
>
> (Not backward compatible -- no one is going to risk this for so little
> gain.)

That's something I never really understood when I was reading ES5 spec, where -0 is a special case, and a sole reason why `x === Number(String(x))` is not true for all numbers.

Why isn't it stringified as "-0"? How did that happen? Do somebody really check if something is less than zero using "-" in string representation?