4 ms·
And you'll never get them because they're unnecessary.
by kyrias 14y ago
And you'll never get them because they're unnecessary.
- Oodiey0h 14y agoThe Golang authors had to create a custom keyword (make) for the two generic types in Go (slice and map). The reason they give for implementing a native map type is that a map type written in Go would be cumbersome (!). If you want other types with generic functionality (e.g. caches) that perform well (interface{} does not), then you have to use external code generators.
- happy_dino 14y agoI think that asks for some further explanation, considering that Go even ships with hard-coded, built-in “generic” data-structures and the topic comes up pretty much every other week on the mailing list.
- p0nce 14y agoThen why is everyone asking for them?