by paskozdilar · 4y ago · 0 comments
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.
Check out this excellent blog post: https://planetscale.com/blog/generics-can-make-your-go-code-....
It’s seems like a static polymorphism but not monomorphism, which also is implemented in Go generics but for simple types.