[Bindings] comments

I think we should rename this specification to "Web IDL" as it defines an  
IDL language to be used by Web APIs. It also defines a mapping to language  
bindings, but that aspect is less interesting.


http://www.w3.org/TR/2007/WD-DOM-Bindings-20071017/#Overloads is really  
inconvenient from a specification editor perspective. I would like the IDL  
syntax to look a lot more like the IDL syntax in the XMLHttpRequest  
specification. That the four "different" open() methods map to different  
methods in languages that do not support overloading is ok, but ideally  
the IDL stays simple. For my part the names for other languages are  
auto-generated. open_1, open_2, etc. If that is really unacceptable I'd  
like to know how much additional text is needed in the XMLHttpRequest  
specification to cover for those three additional methods. If there's  
indeed need for additional text besides rewriting that part of the IDL it  
seems like this is not the optimal solution as in the end we want to write  
less.

And send() / drawImage() type of overloading is necessary, but that seems  
to be mentioned already, albeit with some open issues which I'm not sure  
how to resolve. Maybe by giving languages that don't do it separate  
methods?


It would be really good if we had a way to say that a particular interface  
is exposed on the global object in ECMAScript. For instance, it makes  
sense to have window.XMLHttpRequest, but window.DocumentSelector is not  
necessary given that you already have window.Document.


For constructors, I was wondering whether it's desirable to be able to  
express the Image() constructor on HTMLImageElement or not. (If so, you'd  
need a way to name a constructor.) The way HTML 5 solves that problem  
currently seems pretty simple too. In addition constructors probably need  
to be able to deal with overloading as well.


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>

Received on Friday, 21 December 2007 23:51:09 UTC