News for hackers. Stuff that matters.
Re:Fixing for Loops in Go 1.22 by robertlagrant on Tuesday September 19, 2023 @04:24PM (#37576003)
Isn't that "working with future point releases", though? If I don't declare 1.22, am I not excluded from that point release?
Re:Fixing for Loops in Go 1.22 by ben0x539 on Tuesday September 19, 2023 @04:41PM (#37576216)
I assume that if compiling with 1.22 or later, you still get all the benefits from that version like other new features, bug fixes or perf improvements, just not this particular change.
Re:Fixing for Loops in Go 1.22 by mrkstu on Tuesday September 19, 2023 @04:46PM (#37576287)
No, the compiler will revert to the original behavior, it only adopts the new behavior with the declaration.
Re:Fixing for Loops in Go 1.22 by skywhopper on Tuesday September 19, 2023 @08:22PM (#37578918)
This has all been addressed in the proposal. The research was done and this change will impact so few projects that it’s worth making a technical exception to the compatibility promise to fix a real design flaw.