News for hackers. Stuff that matters.
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.