WebIDL

Maciej Stachowiak mjs at apple.com
Fri Sep 25 22:40:14 PDT 2009


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20090925/0c1a8223/attachment.html>


More information about the es-discuss mailing list