super.apply(this, arguments)

Jeff Dyer jodyer at
Thu Dec 20 10:05:41 PST 2007

Sorry, I didn't mean to sound so flippant.

As you may know, super expressions limit the binding of the name after the
dot to the base class bindings. So the fragment above would call the super
instance method 'apply', not the super constructor. We could give 'apply'
some special meaning when the first argument is 'this', but the super
constructor will have already been called during initialization.

None of this means that the desired semantics wouldn't be possible to
achieve with another syntax. My guess is that it would be somehow similar to
the current super initializer syntax, which looks like this:

   class A extends B {
      function A(x,y,z) : super (x,y,z) { }

Suggestion welcomed.


On 12/20/07 9:04 AM, Dean Edwards wrote:

>> On 12/20/07 7:20 AM, P T Withington wrote:
>>> Ok.  I didn't look in the wiki to start with because of that, hence I
>>> ask on the list:  can I apply my super's constructor as in the subject
>>> line?
> Jeff Dyer wrote:
>> Sorry, but you can't.
> That's a shame.
> -dean

More information about the Es4-discuss mailing list