On Oct 10, 2012, at 9:12 AM, Allen Wirfs-Brock <[email protected]> wrote:

> 
> On Oct 10, 2012, at 6:39 AM, David Bruant wrote:
> 
>> 2012/10/10 Keith Cirkel <[email protected]>
>> You /are/ actually passing in a second argument though, your second argument 
>> is `undefined`. Default arguments aren't meant to replace `undefined` 
>> values, they're meant to be permissible for omission.
> 
> 
> No, that isn't what the draft specification now says.  It was originally that 
> way, but TC39 based upon discussions here, decided that an explicit undefined 
> argument value triggers default value initialization.

I still disagree with this decision, but from an implementation standpoint the 
cost difference is fairly minimal (there is of course an additional runtime 
performance cost, but i suspect it would be negligible).

I guess it depends on whether the committee feels that we should be encouraging 
the use of null over undefined in new syntactic constructs.

--Oliver

_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to