News for hackers. Stuff that matters.
Re:Ask HN: Was it worth it for Go to add generics by evanelias on Friday October 07, 2022 @01:34PM (#33124475)
The official Go release policy is to only support the 2 most recent versions, currently Go 1.18 and 1.19. So libraries can strictly follow this policy and use generics without any need for build flags.

That said, libraries often want to be friendly to older Go versions, so I agree with your overall hypothesis.

Backwards compatibility is another major concern for libraries: I assume you can't safely change the signatures of existing functions from interfaces to generics, for example. (Well, aside from some special cases like interface{} becoming "any".)

There are no comments on this comment yet.