What are the practical consequences of differences in Smalltalk/C++ inheritance?
[For context, please read the previous FAQ]. Smalltalk lets you make a subtype that isn’t a subclass, and allows you to make a subclass that isn’t a subtype. This allows Smalltalk programmers to be very carefree in putting data (bits, representation, data structure) into a class (e.g., you might put a linked list into class Stack). After all, if someone wants an array-based-Stack, they don’t have to inherit from Stack; they could inherit such a class from Array if desired, even though an ArrayBasedStack is not a kind-of Array! In C++, you can’t be nearly as carefree. Only mechanism (member function code), but not representation (data bits) can be overridden in subclasses. Therefore you’re usually better off not putting the data structure in a class. This leads to a stronger reliance on abstract base classes. I like to think of the difference between an ATV and a Maseratti. An ATV (all terrain vehicle) is more fun, since you can “play around” by driving through fields, streams, sidewalk