News for hackers. Stuff that matters.
Re:More Gotchas of Defer in Go, Part II by pcwalton on Thursday December 21, 2017 @12:35PM (#15980843)
The semantics of many languages' for loops are explicitly designed to avoid this problem: for example, for-of in ES6. Generally, modern language design considers the interaction between loop iteration variables and closure captures. It's reasonable to criticize Go as a language for not addressing this problem rather than users.

There are no comments on this comment yet.