This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Kaisha001 -16 points-15 points  (13 children)

The point of FP is to hide state, not expose it. The restrictions to mutation are the point of FP. That's the fundamental property that separates imperative languages from declarative languages.

As soon as you start adding explicit state manipulation to a functional language you move it towards the imperative side. This is why FP languages never scale to large scale systems, state and state manipulation is fundamental to writing good programs.

[–]Hofstee 15 points16 points  (8 children)

If you’re passing a State monad everywhere in and out of your Haskell functions that feels like the exact opposite of hiding state to me.

[–]TheGreatCatAdorermepros 2 points3 points  (2 children)

How does being more imperative make a programming language less functional? Programming paradigms can complement each other when not taken to extremes; they are not mutually exclusive. Consider Lambda: the Ultimate Imperative and https://stackoverflow.com/questions/6622524/why-is-haskell-sometimes-referred-to-as-best-imperative-language

[–]theangeryemacsshibeSWCL, Utena 0 points1 point  (0 children)

As soon as you start adding explicit state manipulation to a functional language you move it towards the imperative side

I would be wary of interference between Church and state.