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

Enforcing (unsigned) long long ranges

From: Sigbjorn Finne <sof@opera.com>
Date: Wed, 08 Jan 2014 08:44:28 +0100
Message-ID: <52CD01DC.4040607@opera.com>
To: public-script-coord@w3.org

currently, the ES binding for WebIDL uses the range of exactly 
representable integers [-2^53, 2^53] (*)


ES6 will provide support for testing the range of unambiguously 
representable integers [-2^53 + 1, 2^53 - 1]


a range with desirable properties wrt equational reasoning.

So, with the above, if you have an attribute like

   [EnforceRange] attribute long long tvisyn;

an implementation of the ES binding will enforce the WebIDL "long long" 
range, but ES(6) code will have to perform a second check of the range 
if concerned about restricting this to the safe range.

How about aligning the WebIDL IDL range with ES6 & unambiguously 
representable integers?

(Apologies if this has been resolved already or there's an open issue on 
it; couldn't find any.)


* - a fairly recent change,


(it was the "safe" range prior to that.)
Received on Wednesday, 8 January 2014 09:33:17 UTC

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