> But - there are some things about Go generics that are particularly weird. The biggest one is that, in a lot of cases, they can actually just be another way to write runtime polymorphism, not static polymorphism as in languages like C++.
Isn't static polymorphism the whole point of generics? Runtime polymorphism was already possible through interfaces and type switches.
Also you can't type switch a generic variable, so runtime polymorphism with generics seems literally impossible.
Isn't static polymorphism the whole point of generics? Runtime polymorphism was already possible through interfaces and type switches.
Also you can't type switch a generic variable, so runtime polymorphism with generics seems literally impossible.