Bait taken: Arguments about arguments

Brendan Eich brendan at
Thu Jan 15 19:38:13 PST 2009

On Jan 15, 2009, at 7:27 PM, David-Sarah Hopwood wrote:

> Brendan Eich wrote:
>> On Jan 15, 2009, at 4:54 PM, David-Sarah Hopwood wrote:
>>> Brendan Eich wrote:
>>>> On Jan 15, 2009, at 9:50 AM, Erik Arvidsson wrote:
>>>>> Is there a reason why we need to restrict the argArray to apply  
>>>>> this
>>>>> much? I think it would be very useful to allow anything array like
>>>>> here.
>>>> Please define "array like" and give examples (possibly including  
>>>> DOM
>>>> nodelists, which thanks to "live update" are are neither lists nor
>>>> arrays, rather more like cursors).
>>> "array-like" means having 'length' and array index properties.
>> And the constraint that index < length for all index properties?
> No.
>> And other constraints from ES1-3 [section 15.4] as follows?
> No.
> If I'd meant to include those constraints, I would have said so.

Bully for you. What I'm looking for is your rationale.

> The constraints are not needed here. You just read 'length' using
> [[Get]], and then read each array index property from 0 to
> ToUint32(length)-1 inclusive using [[Get]]. This is how all of the
> generic methods that operate on array-like objects work.

Good, this is the rationale I sought.

> I think you're making mountains out of molehills in this subthread;
> a Function.prototype.apply that treats its arguments array generically
> is quite easy to specify (and implement).

I agree, and I've made no mountain. You must be thinking of some other  
"subthread". If asking you for rationale makes a mountain, then climb  


More information about the Es-discuss mailing list