Ranges for for loops was a long time coming. Some C programmers just completely lost their shit at having to use a while loop for some reason. It was such a common complaint that we invented stuff like the following as a joke, that of course became something people actually used because internet gonna internet:
Which, for those unfamiliar with Zig, has `for` iterate over an 'array' of 0-bit values and capture the index while throwing out the value (which would always be 0 because that's the only value a 0-bit type can represent).
The implementation of this proposal brings with it the additional benefit of making index capturing less mysterious.
I suspect the real reason behind "some C programmers losing their shit" was being forced to introduce a new variable into the outer scope, or to use extra braces around your loop -- both are distasteful hacks, according to some.
The implementation of this proposal brings with it the additional benefit of making index capturing less mysterious.