Hacker News new | ask | show | jobs
by evanelias 1346 days ago
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".)