> A programmer who wrote the assignment aPusher.push = MyArray.prototype.push was probably thinking that they could just reuse the push method from MyArray.prototype and that the super.push call within it would start searching for a push method at the [[Prototype]] of aPusher. But it doesn't.
As a programmer - I wouldn't think it'd make that call. I don't think that it's safe to say most JS developer would expect `super` to call `Pusher` here. JS programmers are used to dynamic `this` and ad-hoc mixins but I don't think they would expect dynamic `super` when "borrowing" methods like that. I think people view `this` as context and `super` as an alias but time will tell. Care to share more interesting use cases for `mixin`?
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss