Inheritance Is Terrible
A little OT...but does anyone have insight into the historical reasons of why inheritance seems to be the default entry point into teaching&#x2F;explaining OOP and classes? I remember learning all about inheritance in school but only tangentially about interfaces. And looking at explainers&#x2F;tutorials in the wild, it seems that many&#x2F;most start out with the classic Duck &gt; Animal or Thing &gt; Car examples.<p>I want to chalk it up to inheritance being an inherently easier thing to think about in real world terms, with a name that has easily-understandable connotations, even if some of those connotations are probably harmful in the way they muddle up via leaky abstraction when thinking computationally. Whereas with mixins&#x2F;interfaces...those terms have never made immediate sense to me.<p>And yet when it comes to implementing OOP, mixins&#x2F;interfaces seem so profoundly more suitable as the go-to strategy that I wish I had learned exclusively about them, with inheritance being left for edge cases. Maybe I just had a bad curriculum or bad memory when it came to the lessons about interfaces. But if there is a stronger focus on inheritance when it comes to teaching OOP, is it due to the design of C++&#x2F;Java? Or just the practicalities of teaching OOP? Teaching about classes seems like a good first step in teaching OOP, and teaching about inheritance requires fewer new concepts&#x2F;syntax from defining a class. Whereas mixins&#x2F;interfaces require introducing the concepts of modules.