W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2011

Re: [WebIDL] Behavior for negative values passed for unsigned arguments

From: Jonas Sicking <jonas@sicking.cc>
Date: Fri, 9 Sep 2011 12:23:58 -0700
Message-ID: <CA+c2ei-ZXkEms+WBEwNMq9xTi_FANJHc+Kq=_+5Cy_o95h2fCg@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: public-script-coord@w3.org
On Fri, Sep 9, 2011 at 10:35 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 9/9/11 1:28 PM, Jonas Sicking wrote:
>> In the IndexedDB spec we've started working around the current default
>> behavior for unsigned arguments by making arguments signed and define
>> that an exception is thrown for negative values.
> That's why the EnforceRange annotation exists: so you don't have to do that!

I still think we should make the behavior for unsigned arguments sane.
It seems silly if we in 99% of the places where we use unsigned also
have to add EnforceRange.

Are there really any functions where we *want* unsigned values to
wrap? Either because it produces better behavior, or because it's
required for web compat?

/ Jonas
Received on Friday, 9 September 2011 19:24:56 UTC

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