Tom Van Cutsem wrote:
At its core, this "footgun" is not specific to Javascript proxies: it's an old problem in OO frameworks in general, whose documentation may state: "if you subclass class C, and you override method "foo", make sure you also override method "bar" consistently!". I'm sure you've had way more practical experience with exactly this issue in developing OO frameworks than I ever have :-)

Agreed. Some OO languages preclude super calls except to the same-named method as the one making the call, because they want all peer method calls to be virtual in the C++ sense. This goes too far in my view, though. Sometimes when calling a super-method you need to call a related super-peer-method. ES6 classes with super allow this.

There's no silver bullet for this footgun ;-).

/be
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to