3 ms·
But doesn't that require some level of generics? This is an honest question not rhetorical / a retort.
by xzel 6y ago
But doesn't that require some level of generics? This is an honest question not rhetorical / a retort.
- majewsky 6y agoGo has several generic functions like append() or make() baked into the compiler (https://golang.org/pkg/builtin/ https://golang.org/pkg/builtin/). When people are asking for generics, they're asking for a language-level mechanism for defining additional generic functions beyond these provided by the compiler.
- xzel 6y agoI'm talking more along the line for Map/Filter/Reduce support and why those weren't included in Go originally.
- majewsky 6y agoYes. The distinction is that there are two ways to implement map/filter/reduce: either as additional built-in functions or in std. Only the second way requires language-level generics support.