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

On 6/18/13 11:52 AM, Allen Wirfs-Brock wrote:
> The specification drafts is what you need to be reading as old wiki proposals are seldom updated.

Makes sense.  Bookmarked.  ;)

> No, the line I quoted was added to the spec. in May 2012 and it was just added for clarification (from a previous time this issue came up). It looks like it originally made it into the spec. in October 2011.

<sigh>.  The Spidermonkey implementation dates back to May/June 2012 and 
was definitely based on the wiki (that's what's linked from 
https://bugzilla.mozilla.org/show_bug.cgi?id=757676 ).

I filed https://bugzilla.mozilla.org/show_bug.cgi?id=884372

> Yes it does.  It remains the case in ES6 that all formal parameters are actually "optional".  The only real issue is what initial value they get if a corresponding argument is not present.

Perfect, thanks!

Given that, I think WebIDL should remove all restrictions on which 
optional arguments should be allowed to have default values as well.  I 
filed https://bugzilla.mozilla.org/show_bug.cgi?id=884373 accordingly.

-Boris

Received on Tuesday, 18 June 2013 16:26:48 UTC