3 ms·
Good list, and indeed not really advice for beginners. I'm not sure reading the standard library for language X is necessarily a good way to learn the conventi
by gumby 5y ago
Good list, and indeed not really advice for beginners.
I'm not sure reading the standard library for language X is necessarily a good way to learn the conventions and practices of a language. Typically a standard library contains a lot of complex corner cases that don't need to be worried about when writing ordinary code.
(Expanding). The standard library authors don't know the users of the code. While when you're writing a piece of code with a limited number of developers (could even be thousands) you might, for example, say "all our accessors for class X return const results" while the standard library authors have to handle the non-const case"
- pphysch 5y agoThe advice is "learn from the best", not "learn from the standard library". The Golang standard library just happens to be among the best, according to the author.
- rckrd 5y agoGood point. If you're writing your own library, maybe. If you're writing business logic mostly, probably not. Thanks for the perspective.