On Tue, 24 Oct 2006 06:17:20 +0700, Joao Eiras <[EMAIL PROTECTED]> wrote:

>> It's an array. Most languages support arrays. Why would there be a
>> problem?

> The question is.. is there really the need for the array ?
> Most bindings support variable arguments.

Array:   getElementsByClassName(["c1", "c2"]);
Varargs: getElementsByClassName("c1", "c2");

In the first case, there are just two more characters, but this method has two 
advantages that can't be ignored:
1. All languages have arrays, but not all languages support varargs.
2. It's easy to call the array version with an array that's constructed 
dynamically, without knowing the number of items in advance. Not all languages 
even with varargs support allow you to call a varargs function like that.


-- 
Alexey Feldgendler <[EMAIL PROTECTED]>
[ICQ: 115226275] http://feldgendler.livejournal.com

Reply via email to