4 ms·
Ask HN: Recommendations for idiomatic Go (Golang) code?
Hi,
I'm very fascinated by Go and was wondering which blogs/videos/articles/project would you recommend for "idiomatic" go coding?
I really want to learn Go and I do not want to write Java/JavaScript/whatever using go syntax
- psiclops 10y agoLearn how the language works and what all the basic pieces are. After that, the standard library is the best source for idiomatic go code.
- lsiebert 10y agoI believe that the standard libraries are considered idiomatic code examples.
- christophberger 10y agoIMHO the term "idiomatic" is overused. Every programming language has its idioms, and I am sure you'll learn them when working through Go tutorials, books, or courses. Important here: Empty your teacup if you want to fill in new (different) tea. Try to understand the Go language without falling back to the idioms of other languages. Drop inheritance, generics, exceptions, dot-chaining of statements, and embrace interfaces, explicit error handling, and clear, readable, and maintainable code. As one of the go proverbs says, "Clear is better than clever." (All probverbs here: https://go-proverbs.github.io/ https://go-proverbs.github.io/)