[whatwg] number-related feedback
jonas at sicking.cc
Tue Dec 30 18:17:30 PST 2008
On Mon, Dec 29, 2008 at 11:37 AM, Ian Hickson <ian at hixie.ch> wrote:
> On Fri, 22 Aug 2008, Shannon wrote:
>> Either way I would recommend making a decision on minimum and maximum
>> integer values an using them consistently. If not I can imagine the
>> rapid adoption of 64-bit systems will cause unexpected errors when the
>> same code is run on older 32-bit systems. There are valid arguments for
>> letting each system use its native integer but if this is the case then
>> perhaps the spec should require MIN_INT and MAX_INT be made available as
> ECMAScript does define a range, and the limits of that range are exposed
> to scripts. Are there cases where there are non-script limits that would
> benefit from being exposed? Use cases would be helpful here.
I thought ECMAScript defined the value to be a IEEE 754 64bit float.
I'm not terribly opinionated regarding mandating a range for integer
values, however it does seem like something that scripts could easily
depend on. Further, support for more than 32 bits this is something
that is likely going to change very very slowly. In almost all Firefox
code we define an explicit bitwidth for integers, in the vast majority
of cases 32 bit. So even if you port firefox to a 128 bit CPU you
won't get support for larger integers in web apps. I would imagine all
other implementations do the same thing.
More information about the whatwg