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


Resources

Transcripts

No transcripts available. Earn a free month

Discussion


Gravatar
Brandon Buteaux (790 XP) on
Awesome.

Keep up the SOLID principles work.

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

Gravatar
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.