r/functionalprogramming • u/n_creep • Nov 25 '25
FP What's the Point of Learning Functional Programming?
https://blog.daniel-beskin.com/2025-11-13-point-of-learning-fpBased on true events...
80
Upvotes
43
u/TheRealStepBot Nov 26 '25 edited Nov 26 '25
That whole article and no mention of the cancer of side effects in codebases. Single most useful functional lesson and it can be applied anywhere in programming even if not a strictly functional language. Make functions that take in input and return output. Defer state to special contexts where side effects are known to happen.
Edit: to add to the kids question of why? Because side effects make parallel computation difficult if not impossible without all kinds of heartache. By avoiding side effects you can unlock massive parallelism often without needing locks.
9
u/codeconscious Nov 26 '25
Thanks for this great article! As someone who has begun diving into FP via F# and now Haskell, I agree that the FP approach was "breathtakingly elegant."
13
u/bauhaus911 Nov 26 '25
Ah. To loop is human. To recurse, divine…
15
u/gofl-zimbard-37 Nov 25 '25
For me it's brain candy.
4
u/Critical_Pin4801 Nov 26 '25
I struggled to express this to my friend, who really thought I was talking jibberish. But think about how beautiful folding really is: https://en.wikipedia.org/wiki/Fold_(higher-order_function)
Okay, maybe that article is full of abstract nonsense, but it’s truly beautiful to operate over the entire foldable object as a functional whole, without struggling with the inelegant bounds checking of imperative programming.
It’s so fun!
3
u/thatdevilyouknow Nov 26 '25
Pretty good, I thought it was an interesting problem to put through a solver. If you want to get an 8x8 that runs in the browser you can write it this way as well:
2
u/Individual_Key4701 Nov 27 '25
To make better information systems and other computer programs
2
u/[deleted] Nov 28 '25
Great article! For me personally, it is a mind shift to think about everything as Data: Data In -> Data Out. After diving into functional programming, even with regular/popular day-job languages(like JS/TS), you start thinking in terms of immutability, data flow, and composition of Data to get the Result. This makes the code simpler, easier to change/extend than building OOP-like systems, which are fragile to change, require full knowledge ahead of time, etc.
2
u/autodialerbroken116 Nov 26 '25
To parrot slogans about monoids