Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Why inheritance sucks. Parent comment
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.
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.