> > > Why isn't the |super| lookup-point |this.getPrototypeOf()| > > Assume |super| is |this.getPrototypeOf()|
Let F be a "class", let f be an instance of the class. inside f you have access to a method defined on F. If you call a method defined on F from f and that method calls super, you would be invoking getPrototypeOf(this) which is just F (since this is f, and the prototype of f is F). So you would then end up calling the same method again and recurse endlessly. Basically because you apply methods with a value of this then if super were tied to this you would get infinite super recursion if you chained super calls.
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss