Re:The Brittleness Of Type Hierarchies
by andrewflnr on Tuesday May 08, 2012 @05:57PM
(#3945976)
Um, aren't shared implementations exactly what you're not supposed to use inheritance for? According to the Liskov Substitution Principle (http://www.objectmentor.com/resources/articles/lsp.pdf), if it's not transparently substitutable, it shouldn't be a subclass.
[ Parent
| on HN ]
Re:The Brittleness Of Type Hierarchies
by carsongross on Tuesday May 08, 2012 @11:12PM
(#3946943)
Probably. But I don't care what the OO academics say: look how they designed JUnit.
I find class-based inheritance most useful for reusing base implementations, and interfaces (explicit or implicit) for conceptual encapsulation. I wish Liskov the best of luck in her software writing.