this post was submitted on 21 Jun 2023
22 points (100.0% liked)

Golang

2199 readers
1 users here now

This is a community dedicated to the go programming language.

Useful Links:

Rules:

founded 1 year ago
MODERATORS
 

Go 1.21 RC released today. Some really interesting new additions. I'm pretty excited to see the map and slice package additions that contain a lot of generic methods. Will be nice not to have to maintain my own going forward.

top 7 comments
sorted by: hot top controversial new old
[–] kamstrup 7 points 1 year ago (1 children)

I am super excited for this release. I think varargs min/max() built-ins are my favorite feature. Closely followed by clear() and improved type-param inference

[–] nickel 5 points 1 year ago

Curious to know if slog will finally allow the community to settle on a standard logger. I've been using logr.Logr interface for a long time now with zap as the backend. Will be nice to at least replace zap with the slog as the underlying logging mechanism to remove at least one dependency.

[–] [email protected] 2 points 1 year ago (1 children)

@nickel Not boring release this time !

[–] nickel 3 points 1 year ago

Yea there is some really interesting stuff in this release! Love the addition of generics in the packages. I feel like future Go releases will have a lot more of these nice generic utils in them to help clean up userland code.

[–] stoex 2 points 1 year ago

Love the new built-ins. Also the addition of the slice and map packages are welcome.

I’m still experimenting with PGO, but in my current projects it sadly does not lead to performance gains. Looking forward to working with the feature more in-depth though.

[–] wyrmroot 1 points 1 year ago

That was a good write up of the loop var issue, I had run into that only once and figured it was just a part of the learning curve I hadn’t hit yet. Glad to see it’s an area everyone agreed could improve!