|
|
|
|
|
by iainmerrick
2521 days ago
|
|
Right, I see this as the biggest benefit. Go already has generic built-in maps, channels and slices, so clearly those generic types are useful. If what I actually want is a multiset, say, it would be great to have a standard library class that looks and behaves similarly to map except it’s a multiset, rather than just having to use map and do all the little 1- and 2-line boilerplate tricks for the multiset operations. I can write shorter code that more clearly expresses my intentions, and reduce the risk of stupid little bugs in the boilerplate. |
|