News for hackers. Stuff that matters.
Re:Go 1.22 Release Notes by nalgeon on Tuesday February 06, 2024 @07:20PM (#39282855)
If you find the official release notes a bit dry, I've made an interactive version: https://antonz.org/go-1-22
Re:Go 1.22 Release Notes by thatswrong0 on Tuesday February 06, 2024 @08:24PM (#39283327)
Thank you this is awesome. I find it so much quicker to read and understand things like this with examples.. and these are runnable / editable! Sick.
Re:Go 1.22 Release Notes by justinclift on Tuesday February 06, 2024 @11:13PM (#39284414)
Cool, that does help. It wasn't immediately obvious what the problem with the for loop sharing thing meant, but seeing it run and give unexpected results helped. :)
Re:Go 1.22 Release Notes by drewlesueur on Wednesday February 07, 2024 @12:53AM (#39284989)
really cool
Re:Go 1.22 Release Notes by yeonsh on Wednesday February 07, 2024 @01:28AM (#39285203)
Oh, it's great.
Re:Go 1.22 Release Notes by scns on Wednesday February 07, 2024 @06:37AM (#39287291)
The Compact and Replace examples leave me puzzled, are they correct?
Re:Go 1.22 Release Notes by nalgeon on Wednesday February 07, 2024 @07:22AM (#39287674)
They are correct.

> Functions that shrink the size of a slice (Delete, DeleteFunc, Compact, CompactFunc, and Replace) now zero the elements between the new length and the old length.