4 ms·
I second this statement. I find that my code across different paradigms (imperative/OO/FP) has become a lot cleaner as a result of learning a purely functional
by siraben 6y ago
I second this statement. I find that my code across different paradigms (imperative/OO/FP) has become a lot cleaner as a result of learning a purely functional language that makes it impossible[0] to call an impure function from a pure one, among other things.
Also, since Haskell has a lot of advanced type system features, whatever feature that gains traction in other languages (traits in Rust and Swift, optional chaining, async/await) I find much easier to learn as they are usually specializations of more general concepts in Haskell.
And as someone who also studies mathematics, the connections between functional programming and areas like logic, order theory and category theory run deep—programs can too become objects of mathematical study, with their correctness proved and refactoring sound.
[0] with exceptionally rare caveats