6 ms·
I like the fact that many people consider "reading source code" a way to get Go answers. Go code, the standard library in particular, is really readable.
by xiaq 10y ago
I like the fact that many people consider "reading source code" a way to get Go answers. Go code, the standard library in particular, is really readable.
- k__ 10y agoI also switched from SO to reading source in GitHub for my JS problems. Life became less ambiguous
- eduren 10y agoI feel like whenever I'm forced to dig into my node_modules folder I come out with a greater understanding (and a headache or two for my troubles).
- Clex 10y agoThis is absolutely true, the standard library is very easy to read and this makes using Go very pleasant. When you compare this with C and the libc, the contrast is striking.
- geoka9 10y agoC? Try comparing it with Scala.
- tormeh 10y agoAt least complicated Scala code is very in-your-face about how complicated it is, as opposed to C. The types also make it hard to change one small thing and make everything go wrong. Sure, the standard library source looks like a trainwreck, but it has structural strength. And it's easy to use.
- tonyedgecombe 10y agoThat could be a reflection on the rather thin documentation around the standard library.
- sagichmal 10y agoYou can make a lot of critiques of the standard library documentation, but "rather thin" is certainly not among them. I don't think there's a more deeply-documented stdlib besides maybe Python.
- tonyedgecombe 10y agoI've been playing around with http for the last few days and I've had to Google quite a few things that I would have expected to be in the docs.
- zacmps 10y agoCan you give some examples?
- helper 10y agoI read go's stdlib implementation more than any other language I have ever worked with. The main reason? Because the implementation is just a click away when you are looking at godoc.
- majewsky 10y agoOr just `cd /usr/lib/go/src`.