I don't understand why fixing issue 358 in the Zig compiler isn't trivial. I don't understand the reluctance. I don't understand why:
for (var i: usize = a; i < b; i += 1) { foo(); }
for (var i: usize = a; i < b; i += 1) { bar(); }
Is worse than: var i: usize = a;
while (i < b) : (i += 1) { foo(); }
while (i < b) : (i += 1) { bar(); }
Which is what happens without the for-loop scoping of the variable. (ie when I cut and pasted, I introduced a logic bug where I forgot to initialize i for the second loop).