News for hackers. Stuff that matters.
Re:Goodbye, shitty Car extends Vehicle object-orientation tu... by tome on Sunday October 20, 2019 @05:29AM (#21303091)
Actually, I shouldn't have made claims about "the core reason why inheritance was developed" because I've no idea why it was developed. On the other hand, I believe I know why it is necessary (as opposed to convenient). In many languages there is functionality it provides that is otherwise unavailable.

In Java, or C++, or Python, how can we allow superclass methods to call methods on a subclass (a form of late binding) without inheritance? I don't think it's possible. So unless I am much mistaken (and please correct me if I am wrong), inheritance is convenient for reducing boilerplate but necessary for late binding (in many languages).

Have I made a mistake in my analysis somewhere?

Re:Goodbye, shitty Car extends Vehicle object-orientation tu... by kd5bjo on Sunday October 20, 2019 @12:14PM (#21305034)
The “superclass” can take a config object with a well-defined interface in its constructor, and call methods on this config object when it might need to do something differently.