“Think Twice, Code Once”
Hi everyone! This is a revised version of my article from my personal blog.
Previously, in my last article, I had expla...
For further actions, you may consider blocking this person and/or reporting abuse
OOP and SOLID is not for everything.
Just a fact that, SOLID makes you a better developer. Something you learn with experience.
Some of the solid principles certainly do apply to FP and OPP that is true. But when I was a junior I used to blindly quote SOLID for everything, not a mistake I wish others to repeat.
Yes. Admit what you are saying.
Good OOP winds up as functional parts anyway. Why? The Single Responsibility Principle. Ultimately functional programming styles and OOP are the same thing when favoring composition over inheritance.
The whole Inheritance discussion is of much lesser importance; but unfortunately, many articles start off with discussing it.
Traditional inheritance is an advanced topic and not strictly needed or taught in Javascript. This is due to the excellent 'functions as true first class citizens' feature of Javascript.
C# and Java don't treat functions as true first class functions which leads to other solutions. All of which we are too familiar.
Certain problem statements can fit perfectly into design patterns. Design Patterns where entity are considered as objects, are easily resolvable. FP is a great way of solving problems, but not serves all the purpose.
Nice article, a few weeks ago I've posted mine talking about SOLID in PHP with real examples, I hope it may help you. dev.to/evrtrabajo/solid-in-php-d8e
Thank you.
Always found
Premature OptimizationsandPremature Implementation😢Did not get you
Sorry for my bad English, I'm not so good at it please be patien with me 😢
I mean, I've always found these anti pattern in my project
Hey, no issues.
Premature Implementation and Optimisation is something we learn to avoid with experience.
functional programming achieves SOLD more easily and with less side- effects than OOP. i'm sold!!
Functional Programming definitely has its perks over OOPs in context with SOLID principles.
In the United States, a cycle is not ever a car.
Therefore, this is a bad example for the United States, because it violates inheritance rule #1, do not ever violate 'is-a' relationships.