brendan at mozilla.com
Fri Jan 9 14:59:16 PST 2009
On Jan 9, 2009, at 2:54 PM, Kris Zyp wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> What is the current state of the result of typeof on decimals, was
> there consensus on this?
Did you follow Sam's link?
> I hope we will be using typeof 1.1m ->
> "number". For a little bit of emperical evidence, I went through
> Dojo's codebase and their are numerous places that we would probably
> want to alter our code to include additional checks for "decimal" if
> typeof 1.1m -> "decimal", whereas if "number" we would probably leave
> virtually everything intact in regards to number handling with
> consideration for decimals.
The counter-argument is strong:
typeof x == typeof y => (x == y <=> x === y)
but 1.1 != 1.1m for fundamental reasons.
More information about the Es-discuss