Mutable Value Semantics Trend vs Immutability

Haskell also has this “hybrid” ability (to an extent) - by using the monadic ST type, a function can have an imperative implementation but without imposing an imperative interface on its callers, by using runST. Others have also mention more recent developments e.g. linear types.


No. And in fact, your prior observation:

…is a reasonable description of what usually happens in Haskell: by using types, we can indeed “communicate our intention as clearly as possible to the compiler, the caller, and the callee so that when I mutate or want to keep a reference to a value, they can be noticed, so that they can leverage their tools to optimize, verify and modularize.”

But this approach just isn’t to everyone’s liking:


…or as I described it here:

[…] the siren call of pervasive imperativity is still just as beguiling […]

…a recent case in point:

Mutation: it remains just as troublesome, but we still can’t seem to get rid of it entirely! This seems promising:

…but there doesn’t appear to be a great interest in making Haskell parallel by default (at least for now), which would help greatly to show the advantages of keeping things immutable as much as possible. And so in the absence of progress towards eliminating mutability entirely, new “not-as-imperative” languages have appeared, with each promising to simplify “the great mutability divide” in one form or another…and here we all are.

2 Likes