4 ms·
This is a problem with template metaprogramming, not with generics. Code using generics isn’t less obvious than code using only specialized types. On the contra
by thomasz 7y ago
This is a problem with template metaprogramming, not with generics. Code using generics isn’t less obvious than code using only specialized types. On the contrary: You work with strong typing instead of using interface {} everywhere.
- baby 7y agoPeople use interface{} everywhere because union interfaces don’t exist in Golang. If union interfaces were a thing you could be writting func thing(a car+plane)