Re: [WebIDL] On overloaded operations in an effective overload set

Hi Shiki.

Shiki Okasaka:
> I've chatted with several engineers and researchers about this. If
> this interface A becomes an effective overload set in Web IDL, we need
> a clear set of rules to resolve ECMAScript function calls like below
> into either f2 or f3:
> 
>    a.f(123, "hello", "there", "3.14");
>    a.f("not a number", "hello", "2.72", 3.14);
>    a.f("123", 1234, "3.14", "2.72");
> 
> And it seems defining those rules would be not very easy.

I’ve made DOMString and the numeric & boolean types be distinguishable,
now.  Your examples from the original mail in this thread,

 * <f2, (DOMString, DOMString)> and <f3, (long, DOMString)>
 * <f2, (DOMString, DOMString, float)> and <f3, (long, DOMString, DOMString)>
 * <f2, (DOMString, DOMString, float, float)> and
   <f3, (long, DOMString, DOMString, float)>

should now work.  I have revised the definition of the effective
overload set and the overload resolution algorithm.  Review would be
welcome.

  http://dev.w3.org/2006/webapi/WebIDL/#dfn-effective-overload-set
  http://dev.w3.org/2006/webapi/WebIDL/#dfn-overload-resolution-algorithm

Thanks,

Cameron

-- 
Cameron McCormack ≝ http://mcc.id.au/

Received on Wednesday, 17 June 2009 06:34:58 UTC