News for hackers. Stuff that matters.
Re:The Zen of Go by bigato on Sunday February 23, 2020 @04:41PM (#22399730)
The standard library
Re:The Zen of Go by monocasa on Sunday February 23, 2020 @05:00PM (#22399832)
I get told all the time about how the standard library isn't a great example of go code, because of the backwards compat they have to do.
Re:The Zen of Go by sagichmal on Sunday February 23, 2020 @05:31PM (#22400008)
stdlib was once an exemplar of good, idiomatic Go code, but a lot of the idioms it uses haven't withstood the test of time, and it's less and less appropriate as an example.
Re:The Zen of Go by 0xFACEFEED on Sunday February 23, 2020 @05:43PM (#22400066)
This is true, but it's still worth poking around for pre-existing solutions to problems. My editor will jump to stdlib definitions so I've learned a lot just diving into various stdlib packages (I remember the JSON parser being a good one).