Andrea Giammarchi (2013-12-03T17:36:29.000Z)
domenic at domenicdenicola.com (2013-12-10T01:31:23.206Z)
Thanks Allen but you mentioned `Object.mixin` twice while this has been abandoned so I still have hard time thinking about a concrete real-world scenario where toMethod is needed. Do you have any code example? The one in the meeting note is very likely nothing nobody would ever write. > If instead you coded: here my problem ... toMethod cannot assume I know what people coded instead ... toMethod looks like a foot-gun able to bring many shenanigans. If I have an explicit `SuperConstructor.prototype.method.call(this, arg)` inside an inherited class method I know what I am invoking, I know what happen to that instance in that moment, I can trust the execution of that code. This is what TypeScript is doing to, as far as I remember. The moment `super` becomes dynamically mutable due toMethod call: 1. TypeScript will fail as it is 2. I have no idea what the super method expects from my instance neither what it does being kinda privileged too being promoted as parent 3. if every transpiler has to create this magic we will end up in a much slower intermediate code as it is for `this.super(arg)` resolved dynamically in [redefine.js][1] instead of the direct `super.proto.method.call` So far I don't see any win, plus I cannot think of any scenario where this magic is needed/wanted/useful. Thanks again for your patience 1: https://github.com/WebReflection/redefine#classes