Re:Go Is a Well-Designed Language
by bbatha on Wednesday January 08, 2025 @10:06AM
(#42634990)
You might want to check in again. Generics have been in go for a couple of years now. There are loads of generic data structure libraries now. The most recent release of go included a way to generic structures with `for range` loops. Which unblocks the ecosystem from writing iterator helper libraries.
[ Parent
| on HN ]
Re:Go Is a Well-Designed Language
by retrodaredevil on Wednesday January 08, 2025 @01:43PM
(#42637160)
Not sure how I didn't find this before, but https://github.com/zyedidia/generic looks like a decent library.
Although there are some decent libraries out there for this kind of thing, my complaint mostly stems from the fact that a lot of existing code doesn't involve generics yet.
I think I remember skimming an article about for range loops on Hacker News a while back, but again, my main complaint is still that existing code exists in a way that doesn't incorporate all these new features yet.