clean-code-javascript icon indicating copy to clipboard operation
clean-code-javascript copied to clipboard

Change wording and add examples for Liskov Substitution Principle

Open strunkandwhite opened this issue 7 years ago • 1 comments

Hello! Love this repo - incredibly useful, and I've bookmarked it for future reference.

I'd like to suggest a change to the writeup on the Liskov Substitution Principle. The text right now indicates that instances of a parent and child class can be used interchangeably. This is incorrect - the parent can be replaced by the child, but not the other way around. I've updated the wording and added a small illustrative example.

Thanks for maintaining this!

strunkandwhite avatar Jan 15 '19 04:01 strunkandwhite

Thanks for your expertise! You're right.

Can you update your commit to not have the code example at the bottom. I like to keep the code examples only in a Good or Bad block

ryanmcdermott avatar Jan 24 '19 02:01 ryanmcdermott