3 ms·
honestly, I've yet to see a practical application of pure functional programming that is that much better than mostly functional. it's hard for most people to
by kupopuffs 3y ago
honestly, I've yet to see a practical application of pure functional programming that is that much better than mostly functional.
it's hard for most people to follow a completely pure functional programming model, but certain concepts like anonymous functions are still very nice and practical
- Twey 3y agoEvery ten years it's discovered that another idea PL researchers have been harping on about about for forty years is very nice and practical once people get used to it :) I remember when anonymous functions (indeed, first-class functions at all) were considered academic nonsense that just obfuscated problems. After all, who can keep track of all that complexity of functions calling functions?
- lelanthran 3y ago> I remember when anonymous functions (indeed, first-class functions at all) were considered academic nonsense that just obfuscated problems. I've been programming since the mid-90s. I've used both Lisp and Haskell. I don't ever remember even crusty old C greybeards considering anonymous functions to be academic nonsense.
- Twey 3y agoI've honestly had people say this to me within the last year!
- grumpyprole 3y agoThere are many practical examples already in Haskell. Pure functional programming is not necessarily about avoiding effects, but about controlling, tracking and managing them. This enables better reasoning and more safety guarantees. For example, software transactional memory, the STM monad, allows optimistic updates to shared mutable state by safely supporting rollbacks.