Inheritance versus Composition
One of the most memorable eye-opening moments in my (admittedly fractured) education was when when my software engineering professor listed the 3 fundamental tenets of OO—inheritance, encapsulation, and polymorphism—and then asked us which one was optional.<p>Ever since then I&#x27;ve been on an anti-inheritance kick, although for the last several years it&#x27;s polymorphed into an anti-OO kick.<p>Anyway, I suspect most readers here have heard the idea that inheritance should be used in limited circumstances (or not at all), but I wonder what proportion of college students get that message today.