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

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