> It seems to me the spec on the first behavior is a bit less clear
> (Section  "If argArray is either an array or an arguments
> object, the function is passed the (ToUint32(argArray.length))
> arguments argArray[0], argArray[1], ..., argArray[ToUint32
> (argArray.length)–1]".  That doesn't necessarily completely rule out
> actually using the passed-in array to accomplish that, but I can't
> *imagine* an implementation doing it (talk about dodgy practice).  If
> none of the current implementations do (which is easily checked; mod
> the array in the called function and look for the effect in the
> caller), it doesn't seem like anything to worry about.

That's specified more clearly in the Es 3.1 draft, actually. But it
still does imply that a FormalParameterList is built using the array

Also, if it wasn't the case, you would get extremely weird behaviour
like the following:

var myArray = [1, 2, 3, 4];
function foo(a, b, c, d) {
  a = b = c = d = 0;
  // or: arguments[0] = arguments[1] ... = 0;
foo.apply(null, myArray);
>>> [0, 0, 0, 0]

Clearly not an option.
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to