3 ms·
As much a I enjoy writing FP code in some specific situations, the problem described in this article is exactly why I usually do not reach for it when I need to
by ur-whale 5y ago
As much a I enjoy writing FP code in some specific situations, the problem described in this article is exactly why I usually do not reach for it when I need to solve quickly practical, production-oriented problems.
In an imperative setup, this problem simply does not exist.
In an FP setup you need to do brain contortions to get a solution to a trivial problem going.
- fiddlerwoaroof 5y agoThis is the sort of technique you learn once and use a couple times, and then it’s just sort of automatic when you find yourself in this situation. Like learning a new language, the hard part is when the way you think about programming hasn’t fully made the paradigm shift. FP’s power lies providing tools that allow you to decouple processes like “loop forever” or “transform each item of a list” from your application’s own business logic.