Re:Why Generics?
by btilly on Wednesday July 31, 2019 @08:07PM
(#20580001)
It is a hack. The article lists a whole series of things that are standard in other languages that you can't do in go. Here are some examples:
And here are data structures that other languages have but go does not:
If it were not a hack, then go would not have these limitations.
[ Parent
| on HN ]
> Multimaps, with multiple instances of a key
Isn't this just map[Key][]Value? The standard library uses these in several places, e.g. url.Values and http.Header, with assorted utility functions.