Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

And it's funny because go has a whole http server in the standard lib, but not minimum?


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.


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.



Since v1.21, which wasn't released that long ago.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: