@@iterator in arguments object

Allen Wirfs-Brock allen at wirfs-brock.com
Sun Dec 23 10:05:45 PST 2012

On Dec 23, 2012, at 9:38 AM, Brendan Eich wrote:

> Brandon Benvie wrote:
>> You're right, defaults would take care of those few places reducing the need to reference the arguments object entirely. I think there may be one or two exceptions, like when there's no default value but an explicit `undefined` is coerced to "undefined" but a lack of the argument becomes an empty string. I guessable default value of the empty string may cover this but I have a nagging feeling there's some exception in one of the builtin methods that defies all attempts that don't rely on arguments.length, but I can't figure out what that method might be.
> If it exists, it's just bad precedent.
> You could always use an explicit rest parameter as the only formal parameter and still dispense with arguments in new code. So let's say s/could/should/.

And you can then use destructuring assignment to parse out that rest parameter  into one or more signature patterns.


More information about the es-discuss mailing list