3 ms·
It’s not simple vs complex, it’s being able to express something often quite important about the types or not. E.g. a simple map is not implementable in a sane
by kaba0 4y ago
It’s not simple vs complex, it’s being able to express something often quite important about the types or not.
E.g. a simple map is not implementable in a sane manner in a static language without generics, because you likely want to know the type of the object you get from there at compile time. There is a reason C has no sane data structures at all, everyone has their own creation which either brings in a big deal of overhead, or employs copy-pasting mostly the same code (which is pretty much what generics do behind the scenes, at least in an overly simplistic manner).
- deleted 4y ago[deleted]