3 ms·
Utterly backwards, as those who've tried it in practice know. If you attempt to program in a functional way you replace mutation of values with e.g. State monad
by lmm 12y ago
Utterly backwards, as those who've tried it in practice know. If you attempt to program in a functional way you replace mutation of values with e.g. State monad constructs. And you go from having inspectable, debuggable state changes (you can breakpoint the point in code where a value is modified, and this will correspond to the point where it's actually modified, and you can inspect the changes in your debugger) to having state changes that happen invisibly, implicitly, later, when a function is actually called. A closure carries just as much state as an object, but it carries it implicitly, invisibly, undebuggably.
There are advantages to the functional approach - I use it for most of my programming these days - but this article is pure FUD. Actually it goes beyond that, making claims that are outright falsehoods.