Re: [WebIDL] Make [AllowAny] the default?

On 6/12/11 9:38 PM, Anne van Kesteren wrote:
> Okay, that means I can no longer order them in alphabetical order, but
> that really does not matter :-) It does seem somewhat weird that the
> order matters, but otherwise the type would matter, which would also be
> weird.

We've already accepted that order will matter for cases like

   interface A {
     void f(B x);
     void f(C x);
   };

for when an object might implement both B and C (at least in theory).

> Having said that, for unions (not introduced yet) you also need this. So
> there I assume that "Node or DOMString" means everything will be
> DOMString if not Node. (In fact, in case of XMLHttpRequest we could
> describe send() as a union too, there's no particular need for
> overloading there.)

I agree that with "Node or DOMString" you're much more likely to get a 
useful result from converting the JS value to a string rather than a 
Node.  Is that going to be the common case to warrant choosing DOMString 
over the Node?  What about other types like "Node or float" or "Node or 
DOMString or float"?

Or should we make order within the union type matter here too?

Received on Friday, 9 December 2011 00:20:33 UTC