Welcome to The Rabbit Hole, the definitive developers podcast. If you are a software developer or technology leader looking to stay on top of the latest news in the software development world, or just want to learn actionable tactics to improve your day-to-day job performance, this podcast is for you.
166. SOLID - Liskov Substitution Principle
For those of you who have been waiting for the next letter of the SOLID series, we are happy to finally discuss the 'L' in SOLID, which is the Liskov substitution principle, or as we like to call it, the LSP. If you’re like us and the LSP conjures up an image of a long-gone mathematician, think again. It is actually a principle developed by Barbara Liskov, an American computer scientist. In this episode, we get into a simple definition of the LSP, which is that objects should be replaceable with their sub-types, and this should not alter the functioning of the program. To clarify, we use an example of shapes in a program and how the principle would be applied. We also look at how the LSP relates to inheritance, and why inheritance should only be used in certain circumstances. Along with this, we touch on our feelings about interfaces and learn more about William’s experience with TypeScript. Tune in today!