3 ms·
> or better yet why they didn't just make math.Min and math.Max generic? I don't know Go, but my first thought would go to lol no generics. Now that they do h
by loup-vaillant 2y ago
> or better yet why they didn't just make math.Min and math.Max generic?
I don't know Go, but my first thought would go to lol no generics. Now that they do have generics I guess they could do it, but backwards compatibility may require them to use other names than `math.Min` and `math.Max`.
(Note: Go did have some generic built-in constructs from the start, and could have included `min` and `max`, similar to how OCaml did it. At the same time, you don't want too many primitives in your language if you can help it.)