Hacker News new | past | comments | ask | show | jobs | submit login

Exactly; the difference is in scope, the `item` in the range is scoped to the enclosing block, the `item` inside of the block is loop-block-scoped, shadowing the parent block.

That said, it looks and feels dirty and buggy and it's a known workaround for a Go issue, so I'm glad they're at least talking about fixing it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: