Skip to main content

Subscribe to GoRails to get access to this episode and all other pro episodes, and new awesome content every month.

Subscribe Now
Only $19/month

Unlimited access. Cancel anytime.

14 Liskov Substitution Principle

Episode 244 · May 15, 2018

Subclasses should add to a base classes behavior, not replace it

Design Patterns



No transcripts available. Earn a free month


Brandon Buteaux (790 XP) on

Keep up the SOLID principles work.

Pardha (3,240 XP) on
Great Episode !! Looking forward to the other episodes!!

inopinatus (1,220 XP) on
A classic symptom of LSP violation is the Refused Bequest code smell, and the opening example (with the subclass raising an exception) is a nice example.

Hard to believe you said all that about birds and types and didn't mention ducks ;)

Login or create an account to join the conversation.