Comment

Comment by paskozdilar

> 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.

parent paskozdilar 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton