@@iterator in arguments object

Brendan Eich brendan at mozilla.com
Sun Dec 23 12:44:50 PST 2012

Wes Garland wrote:
> Arguments object is used here to fill the rest void, but also as an 
> argument to apply (after converting into a real array) when writing 
> wrapper functions; eg monkey patches, userspace profiling, etc.
> Is there an ES6 way to use apply on rest params?

A rest parameter is a real Array instance. Function.prototype.apply 
works on array instances. What's the problem?


> If not, arguments must live on.
> Sent from my iPhone
> On 2012-12-23, at 12:48, Brandon Benvie <brandon at brandonbenvie.com 
> <mailto:brandon at brandonbenvie.com>> wrote:
>> Yeah good point, and you don't even need to dump all the named 
>> params. In light of this, I think its feasible to pronounce the 
>> arguments object in ES6 as vestigial and ready for retirement (except 
>> for all the legacy code of course). ES6 claims another victim: 
>> [object Arguments].
>> On Sunday, December 23, 2012, Brendan Eich wrote:
>>     You could always use an explicit rest parameter as the only
>>     formal parameter and still dispense with arguments in new code.
>> _______________________________________________
>> es-discuss mailing list
>> es-discuss at mozilla.org <mailto:es-discuss at mozilla.org>
>> https://mail.mozilla.org/listinfo/es-discuss

More information about the es-discuss mailing list