|
|
|
|
|
by troupo
1 day ago
|
|
> (dumb example -- getting a sum of the perimeters of a generic set of shapes in an externally-defined collection type) There's a much more common example: dealing with external APIs that return JSON. Their response is trivially wrapped in Req<T>. Pre-generics Go would force you to write tedious duplicated boilerplate code for each request type, or just "cast to void*" with interface{} and hope for the best. > adding more stuff to Go at this late stage is just slowly chipping away at Go's uniqueness Uniqueness should not be the goal of a language. |
|