2 ms·
i was surprised by it. objc gives you a new variable each time through the loop. it's basically never what you want; if it were changed and you did sometimes w
by dilap 10y ago
i was surprised by it. objc gives you a new variable each time through the loop.
it's basically never what you want; if it were changed and you did sometimes want it, it would be easy to get
var i int
for blah blah blah...
oh well, the cure isn't bad:
i := i
- zalmoxes 10y agoThis is mentioned in the Effective Go document.