4 ms·
Yes, it's easier to reason about correctness in immutability land and add mutability in after the fact as a compiler optimization than to remove mutability for
by zeckalpha 11y ago
Yes, it's easier to reason about correctness in immutability land and add mutability in after the fact as a compiler optimization than to remove mutability for safety as a compiler pass.
- eru 11y agoHaskell sort-of does this. Laziness can be seen as a very disciplined form of mutability. (Haskell also allows mutability that is visible to the semantics of the program, that's where the famous monads come in.)