3 ms·
The 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 typ
by Oodiey0h 14y ago
The 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.