Referencing `super`

Brendan Eich brendan at
Wed Aug 6 17:54:00 PDT 2014

Brett Andrews wrote:
> I think the most obvious and least confusing/breaking way for `super` 
> to function is for it to be the equivalent of `let super = 
> super.[method_name]`

(No `.[` there, that may be used in the future to mean something else -- 
or not!)

This argues for the flip-side: disallow super.currentMethod or 
super.otherMethod or anything like that. If `super` by itself means "the 
method in the superclass with the same name as the enclosing method, 
bound to `this`", then you can't get at peer methods. Maybe that's ok 
(Rubyists think so).


More information about the es-discuss mailing list