Re: [go-nuts] Re: Reasoning behind behavior of range, when index is maintained

2017-07-27 Thread Konstantin Khomoutov
On Wed, Jul 26, 2017 at 08:44:46AM -0700, Christoph Berger wrote: > > someone shared [this question]( > > https://www.reddit.com/r/golang/comments/6paqc0/bug_that_caught_me_with_range/) > > > > on reddit. I must say, that I'm surprised by the behavior myself. I would > > have expected > > for i

[go-nuts] Re: Reasoning behind behavior of range, when index is maintained

2017-07-26 Thread Christoph Berger
Hi Axel, An attempt to explain this by looking at the C-style loop only: The classic C-style for loop for i:=0; i > Hey, > > someone shared [this question]( > https://www.reddit.com/r/golang/comments/6paqc0/bug_that_caught_me_with_range/) > > on reddit. I must say, that I'm surprised by the be