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

Re: Reconciling handling of optional arguments and handling of default values across ES and webidl

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Thu, 09 May 2013 23:20:53 -0400
Message-ID: <518C6795.3070709@mit.edu>
To: Garrett Smith <dhtmlkitchen@gmail.com>
CC: Andreas Rossberg <rossberg@google.com>, Allen Wirfs-Brock <allen@wirfs-brock.com>, "public-script-coord@w3.org" <public-script-coord@w3.org>
On 5/9/13 5:06 PM, Garrett Smith wrote:
> Although it is off-topic here, I disagree that the API cannot be
> redesigned. One or more new methods and/or objects can be created

Oh, new API can be added, sure.  That's somewhat orthogonal to this 
discussion.

> drawImage specifies its overload sets (3, 5, 9). Why can't webIdl
> overload can match the algorithm for that without checking argument
> types?

In this case it does.  Argument type checking only comes into play when 
more than one possible overload matches the passed-in argument count.

And again, for purposes of the undefined discussion what really matters 
here is whether trailing undefined should be counted or not for purposes 
of the argument count for this algorithm.  I guess if we leave 
arguments.length as-is in JS then they should be, for consistency....

-Boris
Received on Friday, 10 May 2013 03:21:23 UTC

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