Better HN
topnewbestaskshowjobs
Log inSign up

ipreuss

2 karma · joined Aug 23, 2010 (16y ago) · 1 submissions

Submissions

comment 16y ago · link · parent

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.