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: Cameron McCormack <cam@mcc.id.au>
Date: Tue, 18 Jun 2013 16:15:53 +1000
Message-ID: <51BFFB19.7010009@mcc.id.au>
To: Allen Wirfs-Brock <allen@wirfs-brock.com>, Brendan Eich <brendan@mozilla.com>
CC: "public-script-coord@w3.org" <public-script-coord@w3.org>, Boris Zbarsky <bzbarsky@MIT.EDU>
Boris Zbarsky wrote:
> ES behavior:
>
> 1) Allow specifying a default value for any function argument, even if
> followed or preceded by arguments without default values, with the
> default taking effect if undefined is passed.

So what about this part of the proposal?  Presumably there are reasons 
that ES6 currently forbids an argument with a default value that is 
followed by one without a default value.  What would be the issue with 
relaxing this requirement?  What's different about rest arguments that 
allows them (without a default value) to follow an argument with a 
default value?

Allen or Brendan?
Received on Tuesday, 18 June 2013 06:19:48 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:37:49 UTC