4 ms·
Please note, currently, there are no tools to detect the new footguns created by the new semantics of 3-clause "for;;" loops: https://github.com/golang/go/issue
by tapirl 2y ago
Please note, currently, there are no tools to detect the new footguns created by the new semantics of 3-clause "for;;" loops: https://github.com/golang/go/issues/66156 https://github.com/golang/go/issues/66156
> The second step is to keep the Go versions in our projects current. Even though we don’t use the latest and greatest language features, bumping the Go version gives us all security patches for discovered vulnerabilities.
It is not always a good strategy to use the latest toolchain version. There are often some fresh bugs in it. From the security perspective, it is better to use the previous version, which is also still being maintained.
- arccy 2y agoyou're literally the only person who's making a mountain out of a molehill coming up with ever more convoluted code to "prove" the change was a bad thing.
- tapirl 2y agoIt indeed is. Please read https://go101.org/blog/2024-03-01-for-loop-semantic-changes-in-go-1.22.html https://go101.org/blog/2024-03-01-for-loop-semantic-changes-... and https://github.com/golang/go/issues/66156 https://github.com/golang/go/issues/66156
- candiddevmike 2y ago.0 is for local development, .1+ is for production
- tapirl 2y agoThere might be some bugs in .2: https://github.com/golang/go/issues/70035 https://github.com/golang/go/issues/70035
- superb_dev 2y agoThe examples in that ticket are convoluted, who would write code like that? Has this issue been spotted in the wild? I agree that there is some issue and a lint should probably warn you about these, but I doubt a lot of people will run into it.
- tapirl 2y agoYou should read that article carefully. Some Go core team members don't agree with you: https://github.com/golang/go/issues/66156 https://github.com/golang/go/issues/66156
- 01119288523 2y agohttps://docs.google.com/document/d/1Cb282k7rrSi4awr0HizuRciX-nIYpympfrxGLEt9cgc/edit https://docs.google.com/document/d/1Cb282k7rrSi4awr0HizuRciX...
- arp242 2y agoGood grief, you're still banging on about this. It's been well over a year. Literally no one agrees with you. That happens sometimes. But please, accept that and give it a rest already.
- tapirl 2y agoCopernicus was in the same position. :)