News for hackers. Stuff that matters.
Re:Why inheritance sucks by ipreuss on Monday August 23, 2010 @06:57AM (#1626407)
I think you need to distinguish between interface inheritance and implementation inheritance.

The reason to use interface inheritance is to allow polymorphism in a statically typed language.

The only reason to use implementation inheritance is code reuse. And yes, you should only do that if the classes conform to the LSP.

There are no comments on this comment yet.