logoalt Hacker News

someguyiguesstoday at 3:07 PM3 repliesview on HN

It only applies to the object oriented programming paradigm


Replies

mrkeentoday at 4:39 PM

Negative.

The only part of SOLID that is perhaps OO-only is Liskov Substitution.

L is still a good idea, but without object-inheritance, there's less chance of shooting yourself in the foot.

marcosdumaytoday at 4:03 PM

That's understating the problem. It mandates OOP.

If you follow SOLID, you'll write OOP only, with always present inheritance chains, factories for everything, and no clear relation between parameters and the procedures that use them.

Exoristostoday at 4:16 PM

This is only superficially true. Here's a fair discussion that could serve as a counterpoint: https://medium.com/@ignatovich.dm/applying-solid-principles-...