W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2009

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

From: Cameron McCormack <cam@mcc.id.au>
Date: Wed, 17 Jun 2009 16:34:22 +1000
To: Shiki Okasaka <shiki@google.com>
Cc: public-webapps@w3.org
Message-ID: <20090617063421.GD4573@arc.mcc.id.au>
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




Cameron McCormack ≝ http://mcc.id.au/
Received on Wednesday, 17 June 2009 06:34:58 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:12:54 UTC