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

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

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Fri, 27 Sep 2013 01:21:55 -0400
Message-ID: <524515F3.2090303@mit.edu>
To: Cameron McCormack <cam@mcc.id.au>
CC: Allen Wirfs-Brock <allen@wirfs-brock.com>, Brendan Eich <brendan@mozilla.com>, "public-script-coord@w3.org" <public-script-coord@w3.org>
On 9/26/13 5:15 AM, Cameron McCormack wrote:
> Yes.  Since arg2 must be specified, I think it makes more sense to have
> length be 2 rather than 0.  WDYT?

Makes sense to me.

> If you have
>    void f(long x, long y);
>    void f(long x, optional Node n);
> and you call
>    f(0, undefined);
> Step 10.2 looks at the undefined value that was passed in, matches it
> against the optional Node argument of f_2, and so selects that overload.

I see.  OK.  I guess that makes sense.

Received on Friday, 27 September 2013 05:22:30 UTC

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