Mateusz Loskot :: hacking on, working out, living up

Inheritance misunderstood

27 May 2010 | mloskot

In C++ inheritance is not for code reuse. Full stop. Think subtyping. Think interface. Think substitution. Think specification. Learn about LSP - Liskov Substitution Principle. Never ever think reuse.

I’m amazed, shamefully, how often I forget about it and I drift away thinking how to save on keyboard use and typing.

Fork me on GitHub