arguments extending Array?

Hallvord R. M. Steen hallvord at
Fri Feb 2 10:15:04 PST 2007

another question regarding the arguments object (I hope these questions  
dealing with details of existing implementations aren't considered  
off-topic, please shout if they are..)

In Opera's implementation the arguments object extends Array, meaning that  
it has all the Array-related methods and also methods and properties set  
on Array.prototype . This has caused an incompatibility with a recent RC  
of Prototype and is considered a bug - but from blog and E-mail  
correspondence regarding this issue it seems several[1] authors consider  
it a nice feature. The arguments object is already "array-like" and apart  
 from the Prototype issue our implementation has caused us no known  
problems (the workaround for Prototype is relatively simple and they have  
already implemented it AFAIK).

Would it be an idea for ES4 to make arguments extend Array?

[1] See for example currently final comment from _Grey_ on the blog post I  
referred to earlier
Also commented on by one or two people in E-mails.

Hallvord R. M. Steen
Core QA JavaScript tester, Opera Software
Opera - simply the best Internet experience

More information about the Es4-discuss mailing list