Go 1.21 release candidate is available.
It has some interesting changes in my opinion:
- clear() for clearing maps
- new slices package for common operations on slices
- new maps package for cloning and comparing maps
And some somewhat interesting ones:
- min/max function directly in the language without a package (could have easily been in math package, but then again, you can min/max strings with this?)
- structured logging package
Some other optimizations and improvements.
What do you think?
6 Comments
EhForumUser@lemmy.ca · 2 pts · 3y
Not easily while not avoiding the allocation hit of variadic arguments. But funny that, after all these years waiting on parametric polymorphism to be able to add a generalized
min/max, it ends up as a built-in anyway.vegasq@lemmy.world · 1 pts · 3y
clear I can understand, but min/max feels wrong.
hal_canary@lemmy.sdf.org · 1 pts · 3y
I'm excited for min/max and for log/slog!
mrh@mander.xyz · 1 pts · 3y
Wow super excited about
slicespackage! Very nice quality of life addition.