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

Re: IDL: number types

From: Marcos Caceres <w3c@marcosc.com>
Date: Wed, 20 Mar 2013 12:39:29 -0400
To: Domenic Denicola <domenic@domenicdenicola.com>
Cc: Boris Zbarsky <bzbarsky@mit.edu>, Yehuda Katz <wycats@gmail.com>, Anne van Kesteren <annevk@annevk.nl>, "public-script-coord@w3.org" <public-script-coord@w3.org>
Message-ID: <6B5A835FBCFE45DE9F5ACEFE0BA98B0E@marcosc.com>

On Wednesday, 20 March 2013 at 12:33, Domenic Denicola wrote:

> This is kind of a meta-question, but is the purpose of IDL types for C++ implementers or for JavaScript consumers?

Initially I think it was C++, but increasingly these are reflected in JavasScript. Boris can provide details, but I think Moz's WebIDL parser/code generator will generate JS stubs. Also, WebIDL Harness, for conformance testing, is in JavaScript. At the end of the day, these things end up being javascript (and I'm hopeful one day we will just be able to use WebIDL itself *in* JavaScript to define interfaces - but that's another can of worms).   
> The way Boris talks about them, it sounds like they are being used directly for C++ implementations.
Yes, this is done also in WebKit (with a variant of WebIDL): Stubs of C++ code are generated from IDL; and I've also seen IDL used in Android for the same reason (except Java is pumped out). 
> But my impression was that WebIDL was supposed to be specifying JavaScript objects created through the parser, in which case there should only be a single number type (aka "Number").

This is what we are trying to get towards.  
> Clarifying the purpose of WebIDL might be a good starting point for any attempts to nail down its type system.

Received on Wednesday, 20 March 2013 16:39:59 UTC

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