Go 1.21 Release Candidate
81–90 of 236 posts
Re: Go 1.21 Release Candidate
#82The WASI preview shows Google is committing engineering resources to WASM, which could grow the community a touch.
Re: Go 1.21 Release Candidate
#83Earlier quoted context omitted.
They're not reserved keywords. Existing/package defined min/max functions would take precedence. They have the same semantics as `append`
You refactored your code, you think you wrote your ``min`` function, but no, it'll call the builtin one, without warning you.. I don't like this design..
Re: Go 1.21 Release Candidate
#84Earlier quoted context omitted.
You refactored your code, you think you wrote your ``min`` function, but no, it'll call the builtin one, without warning you.. I don't like this design..
The compiler will tell you if the types aren't compatible, and this is only for primitive comparable types. What `min()` implementation could you have that even does something different?
Re: Go 1.21 Release Candidate
#85[flagged]
What big thing are you expecting? Go is more of a stable language, a reliable and boring language for building software now that in ten years you can still maintain. Go isn't peaking, Go isn't an exciting or cool or hype language, it's just... there. And that's just fine. Too many languages just started borrowing features from others, saying "yes" to every suggestion, until they got out of control and all over the pl…
Just out of curiosity, can anyone regale me with that history with Java's generics?
Re: Go 1.21 Release Candidate
#86These new packages, like slices and maps, were a long time coming. So glad it's finally here. I cannot even begin to tell you how many different itemInSlice functions I've written over the years.
Re: Go 1.21 Release Candidate
#87Earlier quoted context omitted.
AFAIK, the sha256 extension isn't a part of any of the x86_64 microarchitecture levels, so a cpuid check is most appropriate here at the moment.
Fair point. But what surprised me was the way HasAVX2 is getting set. It is set on the hardware that has AVX2, even if you set GOAMD64=v1.
Re: Go 1.21 Release Candidate
#88> New built-in functions: min, max and clear. What a mistake.. reserved keywords are words I can no longer use for myself... Zig does it better by requiring a prefix @ for most their builtin needs
Re: Go 1.21 Release Candidate
#89Earlier quoted context omitted.
AFAIK, the sha256 extension isn't a part of any of the x86_64 microarchitecture levels, so a cpuid check is most appropriate here at the moment.
Fair point. But what surprised me was the way HasAVX2 is getting set. It is set on the hardware that has AVX2, even if you set GOAMD64=v1.
This was especially important back before the days of v1/v2/v3/etc of x86_64, since Linux distros distributed binaries compiled for the lowest common denominator. So the only way you got fast SIMD instructions (beyond SSE2) was with a CPUID check and some compiler features that let you build target specific functions. (And I'm not sure what the status is of Linux distros shipping v1/v2/v3/etc binaries.)