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

https://www.w3.org/Bugs/Public/show_bug.cgi?id=24241

Boris Zbarsky <bzbarsky@mit.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bzbarsky@mit.edu

--- Comment #3 from Boris Zbarsky <bzbarsky@mit.edu> ---
Marcos, what is the goal of getting rid of numeric types?

They were added because various specifications wanted to coerce numbers to
integers in some range, and having everyone reinvent the wheel for how to do
that is pretty suboptimal....  now you may argue that people shouldn't be
coercing numbers to integers, but it turns out to be necessary when you need to
talk to platform (like operating system, outside the browser) APIs or whatnot. 
And then we need to define the exact coercion steps.

As for EnforceRange, it was added so that specifications that want to throw on
out of range input instead of the somewhat asinine default modulo behavior
(which was left for backwards compat) don't have to reimplement coercion to a
narrower integer type from scratch.  And it's used by at least IndexedDB and
the Media Source Extensions APIs.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Received on Thursday, 9 January 2014 03:24:48 UTC