- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Wed, 19 Feb 2014 12:17:32 -0500
- To: Allen Wirfs-Brock <allen@wirfs-brock.com>, "Mark S. Miller" <erights@google.com>
- CC: "public-script-coord@w3.org" <public-script-coord@w3.org>
On 2/19/14 12:15 PM, Allen Wirfs-Brock wrote:
> if you were defining such a function in ES6, you might either write:
>
> function f(arg) { } //this feels like 'any arg'
> //f.length is 1
>
> or
>
> function f(arg=undefined) {} //this feels like 'optional any arg'
> // f.length is 0
That's true.
I suppose we could keep allowing "any" and "optional any" but have them
processed exactly the same way (basically special-casing "optional"
processing for "any") except for the .length behavior... That said,
would we still want the argc check in that case?
-Boris
Received on Wednesday, 19 February 2014 17:18:03 UTC