4 ms·
> The generic dilemma is this: do you want slow programmers, slow compilers and bloated binaries, or slow execution times? Now that the Go team has approved a
by pansa2 6y ago
> The generic dilemma is this: do you want slow programmers, slow compilers and bloated binaries, or slow execution times?
Now that the Go team has approved a design for generics, which of these did they choose? Or did they “somehow manage to avoid all three of these bad outcomes”?
- ainar-g 6y agoFrom what I could tell, they specifically worked out the current design in a way that allows them to change the implementation later. The current WIP code, as far as I know, mostly just compiles Generic Go code into the regular Go code, so closer to the “slow compilers” method, but the eventual goal seems to be some form of a hybrid approach[1]. EDIT: Here[2] is a direct link to what seems to be the most recent public DRAFT of the design document of the hybrid approach in question. [1]: https://groups.google.com/g/golang-dev/c/OcW0ATRS4oM https://groups.google.com/g/golang-dev/c/OcW0ATRS4oM [2]: https://go.googlesource.com/proposal/+/78bd52518d53994d3fe66aaf04c5075892855d0d/design/generics-implementation-gcshape.md https://go.googlesource.com/proposal/+/78bd52518d53994d3fe66...