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

Re: IDL: number types

From: Erik Arvidsson <arv@chromium.org>
Date: Wed, 20 Mar 2013 14:20:58 -0400
Message-ID: <CAJ8+Goi38TphiQu_ig9RLVac8pFdJ+k8gnBvuShw+5XPYEdNgw@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: Domenic Denicola <domenic@domenicdenicola.com>, Anne van Kesteren <annevk@annevk.nl>, Marcos Caceres <w3c@marcosc.com>, Yehuda Katz <wycats@gmail.com>, "public-script-coord@w3.org" <public-script-coord@w3.org>
On Wed, Mar 20, 2013 at 1:54 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> ES itself will presumably be introducing various To* conversions for its
> definition of typed arrays and DataViews.  Do we expect web specs to need
> conversions like those in other contexts?  Those are the questions we
> should be asking ourselves.

Check out "Table 35" in the latest ES6 draft. For example it provides the
following for Uint8Array:

Constructor Name: Uint8Array
Element Type: Uint8
Element Size: 1
Conversion Operation: ToUint8
Description: 8-bit unsigned integer
Equivalent C Type: unsigned char

So, with ES6 we now have: ToInt8, ToUint8, ToUint8Clamp, ToInt16, ToUint16,
ToInt32 and ToUint32

Received on Wednesday, 20 March 2013 18:21:46 UTC

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