That is a slightly different feature. ...rest is included for
declaring variable length argument lists. But not for passing a
variable number of values when you actually make the call.

// this is implemented in AS3
function myFunction(...rest){
}

// this is not
args = [1,2,3];
myFunction(...args);


Peter



On Dec 21, 2007 11:05 AM, Nathan de Vries <[EMAIL PROTECTED]> wrote:
> On 21/12/2007, at 11:01 AM, Jeff Dyer wrote:
> > We dropped this from AS3 for lack of evidence for its need.
>
> Really? The "rest" arguments (tail arguments specified as an array)
> is available in AS3 as far as I'm aware:
>
>      function foo(first:*, second:*, ...rest) {
>          trace(arguments.length); // variable int, depending on how
> foo is called
>          trace(rest is Array); // true
>      }
>
> Isn't this also in the ES4 overview (page 22)?
>
>
> Cheers,
>
> --
> Nathan de Vries
>
> _______________________________________________
> Es4-discuss mailing list
> Es4-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es4-discuss
>
_______________________________________________
Es4-discuss mailing list
Es4-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es4-discuss

Reply via email to