Thank you (and jochu and pilgrim689) for elaborating on this. I hope to take the plunge at some point and learn Haskell! It seems like an interesting perspective on programming.
Learning Haskell taught me that mutation and state are good things, present both in the fundamental nature of computers and the real world. Haskell's attempts to eliminate state entirely results in a profound increase in complexity.
For me, learning Haskell was like visiting a third-world country: enlightening, very different, but ultimately I leave feeling very grateful that I'm not a permanent resident. All in all, I would recommend the experience.
So obviously you were not very enlightened because it makes no such attempts.
no state in haskell? not in my haskell. state is usually made explicit, yes. there is a state monad because of a reason...
Re:Why Haskell Is Worth Learning
by papsosouid on Tuesday March 05, 2013 @04:10PM
(#5327365)
It doesn't sound like you actually did learn haskell. Haskell does not in any way make any attempt to eliminate state, and the idea that it does is absurd. Why would the language ship with a module called "State" if it were trying to eliminate state?
Re:Why Haskell Is Worth Learning
by rafcavallaro on Tuesday March 05, 2013 @05:36PM
(#5327885)
Substitute "treat like a pariah" for "eliminate" and you're good to go!
Haskell will show you that when you thought you broke your code down into small functions in those languages, you were wrong in ways you currently can't even see and they're still shot through with duplication and mixing of concerns.
This is really the core of the "it changes how you program"; the environments you mention are so full of conflation of IO and mutation and state that you don't even see it, because it's just the way it is. Haskell will ungently pry those apart for you, if you stick around long enough to actually become proficient. You can take this back into other programming languages where this separation is not enforced, but I'm not convinced you can learn it where it is not enforced. The feedback cycle is so direct in Haskell ("Type Error: ...") and so diffuse in other languages (two months later "Aw crap, I should have isolated IO from non-IO better...").
(Oh you think that last parenthetical is a joke? Ha! I wish.)