Comment on Is Go an Object-Oriented Language?parentComments−noblethrasher12yInheritance 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.−NateDad12yShape is definitely much more accurately modeled as an interface than a base class, since it has no functionality on its own.
Comments
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.
Shape is definitely much more accurately modeled as an interface than a base class, since it has no functionality on its own.