News for hackers. Stuff that matters.
Re:Ask HN: Why and how functional programming? by felixschl on Saturday September 29, 2018 @04:40AM (#18099332)
1. If you managed to learn a paradigm as arbitrary and unprincipled as OOP, learning pure FP should be a walk in the park. I find it an odd argument to put in the way of progress. Anecdotally, I have not heard of anyone regretting to learn FP, let alone going back to OOP. I would love to hear from people learning FP first, how did you find learning OOP as a second paradigm?

2. I've never found a need for (automated/annotated) dependency injection in FP. In languages that support it you can use type-classes for the most part or just add another function argument / close over state, or user a `ReaderT`, or most likely a combination of the above.

I'd say the only way to understand how useful and applicable FP is, is to go learn and use it for a while to solve actual problems. I found most things you think you'll miss you won't ever end up missing, because you actually never needed them in the first place.

There are no comments on this comment yet.