Nice, my push for actually using the sha256 instructions on amd64 finally got released. 3x-4x increase in hash speed on most x86 which is really nice for content addressable storage use cases like handling container images.
Go 1.21 Release Candidate
31–40 of 236 posts
Re: Go 1.21 Release Candidate
#32I enjoy Go so much. It is almost perfect language for getting things done, but I still can't understand some design choices. Does someone knows why Go uses env variables (like GOOS and GOARCH) instead command line arguments?
Re: Go 1.21 Release Candidate
#33Re: Go 1.21 Release Candidate
#34Nice, my push for actually using the sha256 instructions on amd64 finally got released. 3x-4x increase in hash speed on most x86 which is really nice for content addressable storage use cases like handling container images.
Got a link to the PR? Curious to see how this is implemented.
Re: Go 1.21 Release Candidate
#35[flagged]
Too many languages just started borrowing features from others, saying "yes" to every suggestion, until they got out of control and all over the place. Go says "no" more often than not. Which isn't always a good thing, mind; generics took a long time because they wanted to understand the problem and not add more like what happened to Java. The builtin min/max features up until this release only supported float64. Lots of small annoyances like that.
Re: Go 1.21 Release Candidate
#36I enjoy Go so much. It is almost perfect language for getting things done, but I still can't understand some design choices. Does someone knows why Go uses env variables (like GOOS and GOARCH) instead command line arguments?
Re: Go 1.21 Release Candidate
#37I wonder if the new stdlib logger is featured enough to get rid of logrus/zerolog.
Re: Go 1.21 Release Candidate
#38It is interesting to see them add things like the "clear" function for maps and slices after suggesting to simply loop and delete each key one at a time for so long. Is this a result of the generics work that makes implementation easier vs. the extra work of making a new "magic" function (like "make", etc.)?
That `clear` on a slice sets all values to their type's zero value is going to be extremely confusing especially coming from other languages (Rust, C#, C++, Java, ...) where the same-named function is used on list-ish types to set their length to zero. Doubly-so when `clear` on a map actually seems to follow the convention of removing all contained elements.
Re: Go 1.21 Release Candidate
#39Seems like a really substantial release to me. The new built in functions min, max, and clear are a bit surprising, even having followed the discussions around them. The perf improvements seem pretty great, I’m sure those will get much love here. Personally, I’m most excited about log/slog and the experimental fix to loop variable shadowing. I’ve never worked in a language with a sane logging ecosystem, so I think sl…
Am I reading it correctly that `clear` does different things for maps and slices? Why doesn't it remove all the items from the slice like it does with the map, or set the values in the map to the zero value like it does for slices? That seems like an easy thing to get tripped up on
Re: Go 1.21 Release Candidate
#40If all goes well, you won't have different libraries using different loggers anymore, in some not too distant future, which should improve easy composability.