`super()` right now is a special syntactic feature, just like the new proposed `import()` and such. To have `super` behave like a variable and be consistent, `super.foo()` would also then be accessing a property on that variable, instead of calling a method from the parent constructor prototype. Then a whole new approach would be needed for parent class access.
On Fri, Feb 17, 2017 at 7:45 PM, /#!/JoePea <[email protected]> wrote: > Why can't we store a reference to `super`? It seems counterintuitive and > prevents possible things like > > ```js > function metaStuff(sup) { > // do something else with super or with `this` > } > > class Bar extends Foo { > constructor() { > let s = super > s() > metaStuff(s) > } > } > ``` > > > */#!/*JoePea > > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss > >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

