Fixing For Loops in Go 1.22 - The Go Programming Language
Fixing For Loops in Go 1.22 - The Go Programming Language
go.dev Fixing For Loops in Go 1.22 - The Go Programming Language
Go 1.21 shipped a preview of a change in Go 1.22 to make for loops less error-prone.

4
crossposts
2
comments
Much needed change, I wish they made it apply for all go versions though
1 0 ReplyAs someone just learning Go, the current behaviour is really unexpected. I’m happy that they are changing it.
1 0 Reply