3 ms·
Like a standard library that doesn't even have a max function for integers, or a set type?
by kccqzy 7y ago
Like a standard library that doesn't even have a max function for integers, or a set type?
- acroback 7y agoIt is trivial to write both of these on your own, why do we need unnecessary abstraction for such a simple task.
- millstone 7y agoSorting, appending to a slice, or removing from the middle of a slice are all awkward and bad in Go.
- kccqzy 7y agoThat's the ethos of Go. The standard library can be poor and woefully incomplete because hey it's easy to reinvent the wheel. And then instead of composing functions (say, a reduce function applied to max to find the max of a sequence), users just end up rewriting everything because it's trivial.
- baby 7y agohow easy to fuck up a max function? Now look at the standard library and appreciate the fact that it comes with every crypto algorithm that are useful, heck it even comes with a crypto random function and a TLS implementation! Wait, it actually comes with a http(s) library. And with a json serializer/deserializer as well. Who does that?
- kccqzy 7y agoAgain that's the ethos of Go. In the many years I spent writing C++ or Python or Haskell I never had to write a max function because it's already there. I don't even need to think about it. And I can compose it easily to form more sophisticated things. > Who does that? Have you taken a look at the Python standard library?
- baby 7y agoI’ve never heard of anyone using crypto from the python standard library