Re:Fixing for Loops in Go 1.22
by beltsazar on Wednesday September 20, 2023 @03:05AM
(#37581242)
Yes, the loopvar change will break some programs, and hence the compatibility promise. But the Go team argues that the change will fix much more programs than it will break [1].
This makes me wonder, though, what guarantees that a similar breaking change won't ever happen again in the future? If any change with #(programs fixed) >> #(programs broken) is accepted, we might as well remove the compatibility promise page [2].
This makes me wonder, though, what guarantees that a similar breaking change won't ever happen again in the future? If any change with #(programs fixed) >> #(programs broken) is accepted, we might as well remove the compatibility promise page [2].
---
[1] https://github.com/golang/go/issues/60078
[2] https://go.dev/doc/go1compat