News for hackers. Stuff that matters.
Re:Inheritance was invented as a performance hack by ahartmetz on Thursday April 29, 2021 @10:36PM (#26989325)
Correctly using a language feature often means using it for more than one reason. Extending superclass code can be well advised in case it also makes sense semantically. Now, I have seen a "mixin" class that just served to provide one relatively independent method, and I turned it into a free function. Much better. In other cases, an extended class works on the whole state of the object. In that case it usually makes sense.

There are no comments on this comment yet.