foo(...args) [Was: super.apply(this, arguments)]

# P T Withington (16 years ago)

Did the use of ... in the parameter list (in the tail position only, I
assume) of a function call to 'spread' an array of arguments get
accepted into the language? Is the proper way to trampoline all my
constructor args to my superclass going to be:

class Foo extends Bar { function Foo(...rest) : super(...rest) { ... } ...

?

# Lars Hansen (16 years ago)

There's an open ticket on it that proposes just that, neither accepted or rejected, really. The super(...args) seems like an important use case.

bugs.ecmascript.org/ticket/357

# Brendan Eich (16 years ago)

On Mar 6, 2008, at 10:53 AM, Lars Hansen wrote:

bugs.ecmascript.org/ticket/357

And Jon Zeppieri kindly implemented this spread (Tucker, have I been
misnaming it as "splat"?) operator in the RI. I just commented again
in the ticket.