3 ms·
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 mak
by djsavvy 3y 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 https://github.com/golang/go/wiki/LoopvarExperiment
- epmatsw 3y agoWow, that’s a blast from the past. Those code examples look exactly like the var to let changes in ES2015…