4 ms·
Go is designing generics around the language tenets, which are quite different from Java's. In themselves, generics aren't particularly interesting...it gets i
by cle 6y ago
Go is designing generics around the language tenets, which are quite different from Java's. In themselves, generics aren't particularly interesting...it gets interesting when you start considering the tradeoffs you need to make in order to align them with the tenets of your language, runtime, and ecosystem. I wouldn't say Go is doing generics "better", they are doing them "differently" to align with the goals of the language.
(Personally, I'm not looking forward to generics in Go, I enjoy the simplicity of not having them and haven't encountered situations where they'd make a huge difference.)