[Laszlo-dev] 'rest' arg doesn't have to be named
P T Withington
ptw at pobox.com
Tue May 27 12:03:15 PDT 2008
Something I just learned about JS2 that I'm not sure we deal with:
When you want to accept, but ignore, additional arguments, you can say:
function foo (...) {
and that means that it is not an error to send you additional
arguments, but also, since the rest arg is not named, it tells the
compiler you are not going to use those additional arguments (so it
does not have to bother capturing them into an array).
We should make sure our grammar supports this.
More information about the Laszlo-dev
mailing list