2 ms·
> It's a lot easier to confirm that a variable is never mutated across 4 lines than it is across 200. It's even easier when the language you're using doesn't l
by sli 7y ago
> It's a lot easier to confirm that a variable is never mutated across 4 lines than it is across 200.
It's even easier when the language you're using doesn't let you mutate or rebind in the first place. You mention Haskell codebases having short functions, but that isn't an automatic given. Haskell and other ML languages are quite friendly to long functions specifically because the language guarantees no mutation, among many other reasons.
In fact, the Elm project explicitly tells Elm developers to not worry about the length of functions because of this property. You can't accidentally mutate or change something and not notice, because you simply aren't allowed to do that.