Hacker News new | ask | show | jobs
by djsavvy 1095 days ago
The new experimental fix for loop variable capture [0] is huge; this is the biggest footgun with the language in my experience.

I hope the experimental fix makes it into the next version of Go by default.

[0] https://github.com/golang/go/wiki/LoopvarExperiment

1 comments

Wow, that’s a blast from the past. Those code examples look exactly like the var to let changes in ES2015…