3 ms·
I think it's quite normal. Because the common three part for semantic is just a suger of initVariable() while checkVariable(): doSomethong…
by mmis1000 4y ago
I think it's quite normal. Because the common three part for semantic is just a suger of
initVariable()
while checkVariable():
doSomethong…
updateVariable()
So the variable is shared by all iterations at first place. And that isn't a issue until we have lambda or something similar that can capture reference of loop variable.
Later languages found it is problematic when use with reference capturing features and changed to something else (one variable per iteration)