2 ms·
That's probably because of the use of different paradigms. If you write typical so called OOP code all the time, sure, you'll hit many instances of this or tha
by zelphirkalt 6y ago
That's probably because of the use of different paradigms.
If you write typical so called OOP code all the time, sure, you'll hit many instances of this or that pattern coming in handy. If you write FP and only occasionally strew in some OOP, well, many of the patterns fly out of the window, as you do not really need then any longer, because the building block is a function and you solve most of the stuff using closures and higher order functions. Also you usually do not mutate state, so that is another load of patterns out of the window.
Surely however, it is good to know the patterns approximately well, so that you can quickly understand the meaning of code, which makes use of them. If only all people used design patterns always in a correct way, instead of implementing them half-way correct and then using them in a weird way ... Never hurts too look up the details again, before introducing a pattern into the code!