Hacker News new | ask | show | jobs
by kyleburton 5827 days ago
I don't think FP is all about concurrency - it's about more than that. In my experience it reduces the possible bugs in code (type inference / checking, referential transparency) - these aspects make concurrency easier to achieve, but that's not all there is to FP.
1 comments

Unfortunately though, FP is being sold as panacea of concurrency problems, at least in Java world.

I think that FP is much more than that, it actually helps me solve problems in a very different and elegant way. I don't know how you classify this benefit but for me it was analogous to solving a problem with recursion or loop; while both can solve problems, recursion seems to be much more intuitive and elegant way - Same for FP vs Imperative approaches.

I'd agree to that, and solving problems in FP always made me think harder to get an elegant solution. Though, it also means that you're uncomfortably close to math. I think to fully exploit/understand FP, the programmer also needs to be good at understanding the mathematical models/formulas behind FP. Otherwise, I think he cannot truly exploit the potential of the tools he's using. I haven't spent a lot of time doing FP to justify that opinion fully, but whatever FP I did made me wish I took my math classes more seriously.
I think it's more that shared mutable everything can't possibly scale in parallel, rather than that FP is a panacea.