It seems like in the r-value usage there it could just evaluate to the method's "HomeObject" no? That would be really useful in cases where the value supplied to "extends" is complex.
Best, Don -- Don Griffin Director of Engineering Sencha, Inc. https://www.sencha.com/ On Fri, Feb 17, 2017 at 11:11 PM, Logan Smyth <[email protected]> wrote: > `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 > >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

