W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2009

Re: WebIDL

From: Maciej Stachowiak <mjs@apple.com>
Date: Fri, 25 Sep 2009 22:40:14 -0700
Cc: Yehuda Katz <wycats@gmail.com>, public-webapps@w3.org, Brendan Eich <brendan@mozilla.com>, HTML WG <public-html@w3.org>, es-discuss <es-discuss@mozilla.org>
Message-id: <8CA8AEA1-1EB4-42BF-A8B4-4A6CEB6BC28A@apple.com>
To: Cameron McCormack <cam@mcc.id.au>

On Sep 25, 2009, at 10:29 PM, Cameron McCormack wrote:

>
> unsigned long doesn’t map exactly to Number.  Assigning a Number to an
> unsigned long attribute does truncation, for example:
>
>  http://dev.w3.org/2006/webapi/WebIDL/#es-unsigned-long
>
> The case could be made for “float”, which maps to Number (apart from
> floats being exactly IEEE 754 singles whereas Number treats all NaNs  
> the
> same).  The type name “float” comes from OMG IDL and is thus already
> familiar to people.  I think it’s a better name for that IDL type  
> (i.e.,
> language binding neutral type) than Number.

JS numbers are IEEE doubles, not singles (modulo the  
indistinguishability of different NaNs and other such details).

>
>> Additionally, it's not a very simple spec to understand. Putting
>> together things like "[Replaceable] readonly" requires some  
>> conceptual
>> work, which makes understanding the HTML5 spec quite difficult.
>
> I agree that’s unintuitive.  Would a different name for the extended
> attribute here help?

For what it's worth, this concept has been called "replaceable" for  
some time in the oral tradition of browser implementors.

Regards,
Maciej
Received on Saturday, 26 September 2009 05:40:56 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:33 GMT