We all know mutable state can be problematic. But the explanations tend to be abstractions like "reasoning" and "composability". What's a simple *convincing* example in single-threaded code? Having trouble making one that isn't obviously bogus. Is it only a problem at scale?
-
-
Which can all be roughly translated as “more like math”, which is not such a compelling argument if you aren’t doing math
-
But that's the point, isn't it? FP is about making programming more like math. It's natural to pick examples from the math domain, where the contrast is most obvious. I guess I'm not sure whether you're against the reasoning or against the choice of example.
- Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
cognitive psychology. PhD