Re:Paul Graham on Spaghetti Code
by rhizome on Friday April 19, 2013 @12:07AM
(#5574751)
"Inheritance breaks encapsulation," the elders said, and as with all extremes, they each have their problems. Language is a lossy codec for math/logic/thoughts, computer languages no less so.
[ Parent
| on HN ]
The "elders" never said that. They invented inheritance because there was a need for it.
Inheritance is a great way to maintain encapsulation in the face of a messy world. Unchecked composition quickly gets you to a world where everything has to be public anyway.