Re:Go: Redefining For Loop Variable Semantics
by jmconfuzeus on Tuesday October 11, 2022 @01:39PM
(#33166303)
I see, it makes sense to force people to use different variables for iteration in that case because it can easily trip inexperienced developers up.
For instance the behaviour of a Python loop varies drastically depending on the size of the iteration:
That Python works this way is specific to Python. And a language which doesn't have the issues this implies would be "getting it right", in the sense of avoiding sharp corners and edge cases.