3 ms·
Your examples are too minimal. In most real-world cases there is a bunch of other variables also in scope of the loop. If all those variables are const you know
by jononor 9y ago
Your examples are too minimal. In most real-world cases there is a bunch of other variables also in scope of the loop. If all those variables are const you know that they are not changed in the loop (or elsewhere), simplifying understanding of the code and also reducing the chance of someone making the code more stateful later.
With default-immutable this const is the default, making it harder to fuck up.