News for hackers. Stuff that matters.
Re:Functional Programming: Is It Worth It? by thomasrossi on Thursday June 02, 2016 @01:12PM (#11824211)
Most of the interesting work I do is in C, so probably not the very top commenter on this, but I have some business in Java. I've seen some functional programming and I agree mostly on the point: "isolating side effects". All the other advantages are yet not very clear to me:/
Re:Functional Programming: Is It Worth It? by dozzie on Thursday June 02, 2016 @04:30PM (#11825762)
Add pattern matching to the list. You combine function call, unpacking the result, and branching based on its structure and/or value in a single statement, without otherwise unnecessary intermediate variables.

Then add working with single-linked lists and pervasive recursion, which somehow gives much higher level code and the right amount of friction to cause functions to be shorter.

Callbacks being natural and obvious is a cherry on the cake (functions as first-class objects is not that big of a deal, but it still helps a lot in overall landscape).

It's not a single killer-feature of functional programming that make this paradigm so loved by its practitioners, it's all the little things combined.