News for hackers. Stuff that matters.
Re:The Brittleness Of Type Hierarchies by gboyer on Tuesday May 08, 2012 @02:00PM (#3944994)
You can just do both, though. Use interfaces for polymorphism, to define the interactions between your objects -- and then, if you want, use inheritance as one possible strategy for code reuse.
Re:The Brittleness Of Type Hierarchies by colomon on Tuesday May 08, 2012 @02:23PM (#3945132)
That works great if you're only using one interface in your class. What if you need to include two?
Re:The Brittleness Of Type Hierarchies by gboyer on Tuesday May 08, 2012 @02:43PM (#3945238)
Then you use a different reuse strategy, like composition. The language is not ideal in this regard, certainly.