Re:Python Is Easy. Go Is Simple. Simple != Easy
by patmorgan23 on Monday November 27, 2023 @02:24PM
(#38436932)
And it's funny because go has a whole http server in the standard lib, but not minimum?
[ Parent
| on HN ]
Re:Python Is Easy. Go Is Simple. Simple != Easy
by kevincox on Monday November 27, 2023 @02:31PM
(#38437027)
It couldn't have a minimum before generics. The function was not expressible in the general case. So they either would have had to add `minByte`, `minInt`, `minStr`, ... or make it a builtin generic. And every builtin is an admission that the language was not powerful enough, so those are kept to a minimum.
Re:Python Is Easy. Go Is Simple. Simple != Easy
by yobert on Monday November 27, 2023 @03:01PM
(#38437411)
I know it sounds funny, but I have used the built in "net/http" in probably fifty projects now, and not a single one of them needed a min/max function.
Re:Python Is Easy. Go Is Simple. Simple != Easy
by porjo on Monday November 27, 2023 @02:33PM
(#38437058)
There is 'min': https://go.dev/ref/spec#Min_and_max