tag
Inheritance
Template Method Pattern
If you’ve ever created a base class with a run() method that calls a series of steps, then let subclasses override only a few of those steps, you’ve already reinvented the Template …
Liskov Substitution Principle: Don’t Surprise Your Callers
The Liskov Substitution Principle (LSP) is the quiet backbone of safe inheritance. It’s the “L” in SOLID, and it answers one simple question: If I swap a base class instance with a …