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

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