W3C home > Mailing lists > Public > public-script-coord@w3.org > January to March 2014

[Bug 24241] Adopt the ES6 "safe integer" range for (unsigned) long longs

From: <bugzilla@jessica.w3.org>
Date: Thu, 09 Jan 2014 03:53:22 +0000
To: public-script-coord@w3.org
Message-ID: <bug-24241-3890-2h79eCV2gy@http.www.w3.org/Bugs/Public/>

Domenic Denicola <domenic@domenicdenicola.com> changed:

           What    |Removed                     |Added
                 CC|                            |domenic@domenicdenicola.com

--- Comment #4 from Domenic Denicola <domenic@domenicdenicola.com> ---
As much as I would love to kill all the number types, I think their replacement
needs a bit more thought first. E.g. a survey of the usages is important, to
find out what predefined ranges people use (and whether they actually depend on
it being in that range, or if they also do other range validation and just
choose e.g. "short" because the valid values are in the range 1-3, or...).

And you'd want some kind of specification for what to replace it with, which
would probably be something vaguely [ThrowIf(>= 10, < 0)] or [ClampTo(1, 8)] or
[Round] or [Floor] or similar.

I think what's most offensive about the numeric types is not the behavior of
coercing to integers or mandating a specific ranges, both of which are useful
and in some cases necessary. What's offensive is that we pretend this behavior
has something to do with traditional C-ish concepts of float, double, short,
long, long long, etc., or that the variables are actually "typed" that way,
when of course they're all just `Number` in JS.

You are receiving this mail because:
You are on the CC list for the bug.
Received on Thursday, 9 January 2014 03:53:23 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:19 UTC