Re:Creating the Go Programming Language [audio]
by kccqzy on Sunday September 29, 2019 @08:35PM
(#21110721)
Like a standard library that doesn't even have a max function for integers, or a set type?
[ Parent
| on HN ]
Re:Creating the Go Programming Language [audio]
by baby on Monday September 30, 2019 @12:59PM
(#21117367)
how 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?
Re:Creating the Go Programming Language [audio]
by kccqzy on Monday September 30, 2019 @03:48PM
(#21119043)
Again 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?
Re:Creating the Go Programming Language [audio]
by baby on Monday September 30, 2019 @07:32PM
(#21120651)
I’ve never heard of anyone using crypto from the python standard library
Re:Creating the Go Programming Language [audio]
by acroback on Sunday September 29, 2019 @09:28PM
(#21110975)
It is trivial to write both of these on your own, why do we need unnecessary abstraction for such a simple task.
Re:Creating the Go Programming Language [audio]
by millstone on Sunday September 29, 2019 @09:47PM
(#21111065)
Sorting, appending to a slice, or removing from the middle of a slice are all awkward and bad in Go.
Re:Creating the Go Programming Language [audio]
by kccqzy on Monday September 30, 2019 @03:23AM
(#21112533)
That'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.