3 ms·
Inheritance is usually a mess because people use it to model objects when they should instead be modeling types: a triangle is not a shape, but a Shape is a sum
by noblethrasher 12y ago
Inheritance is usually a mess because people use it to model objects when they should instead be modeling types: a triangle is not a shape, but a Shape is a sum type of Circle, Square, Triangle, etc.
- NateDad 12y agoShape is definitely much more accurately modeled as an interface than a base class, since it has no functionality on its own.
- deleted 12y ago[deleted]