DEV Community

Discussion on: Is The Liskov Substitution Principle Really Useful?

Collapse
 
miguelmj profile image
MiguelMJ

As you pointed out, SOLID principles are meant to make your object oriented code scalable and maintainable. In my opinion, good practices have their place and should be used by default. However, there may be cases where a generally considered good practice just hinder you.
You have to know well what you are doing, but there might be code that doesn't need scalability, because is follows a rigid design that simply benefits from some characteristics of OOP. If you know (and I mean really know) the consequences of breaking the rules and are OK with it, then "the best practices" shouldn't be an obstacle.

Collapse
 
rhuzaifa profile image
Huzaifa Rasheed

Good Explanation, Miguel. I agree with that, thus left it open for the reader to decide.