Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
noblethrasher
12y ago
0 comments
Save
Share
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.
0 comments
1 comments · 1 top-level
top
newest
oldest
NateDad
12y ago
Shape is definitely much more accurately modeled as an interface than a base class, since it has no functionality on its own.
1 more reply
j
/
k
navigate · click thread line to collapse