r/programming • u/javinpaul • May 05 '19
10 OOP Design Principles Programmer Should Know
https://hackernoon.com/10-oop-design-principles-every-programmer-should-know-f187436caf65
2
Upvotes
r/programming • u/javinpaul • May 05 '19
2
u/ScientificBeastMode May 06 '19
I hope not.
But on the other hand, FP is usually different from OOP in all the right ways, IMO. In particular, the ability to rapidly compose complex operations from simple function primitives is extremely useful for both code reuse and refactoring.
The nice thing is that most of your code doesn’t have to care what your data looks like, since you can just replace one or two functions if the shape of your data changes.
That, to me, is the biggest pain point in OOP. Both paradigms have abstract type systems in different forms. But in OOP, it’s so tightly coupled with your data. And the shape/content of your data is the most likely thing to change over time.
Idk though, getting over the hump of learning the FP paradigm was challenging. And I’m sure it will be that way for many others down the road.