miniblog.
← Back to all posts
Wilfred Hughes
Oct 11, 2022 at 20:42
Superb discussion of Go semantics for `for` loop variables, the challenges of breaking changes, and the tradeoffs of static analysis:
https://github.com/golang/go/discussions/56010
redefining for loop variable semantics · golang go · Discussion #56010
Update 2023-06-06: Go 1.21 is expected to support GOEXPERIMENT=loopvar as a way of trying out these new semantics. See #57969 and https://go.dev/wiki/LoopvarExperiment. We have been looking at what...