Book review - the go programming langauge (gopl)

  • golang
  • book

posted on 11 Sep 2021 in series book_review

Reading this book gives me the same pleasure as the classic C book <K&R>.

Both books have similar style. they explains things fluently and clearly. There are so much tech book either written as blog post lack of some inner flow, or trying to explain things but make it more confusing.

This book take a iterative approach, it first teach essential concepts and components in golang to get readers going, then add more details and depth into things we already familiar with in each chapters later. At last, you find yourself learnt most things in Go Spec, in detail.

The most valuable thing in this book is that it focus on realistic requirement to code for, and the code example is both interesting and enlightening.

For learner who already familiar with programming in other language, I recommend this book as the first book to read when going for golang.

Although this book organize contents roughly by golang’s feature, but it also has topics cross the whole book. This is what I learnt from it:

  • Golang’s language syntax, traps to avoid
  • Idiomatic go, design principles, patterns and best practices
  • Common packages’ api and usage
  • Common algorithms and how to implement it with go (tree, sorting, bitmaps, etc.)
  • How things work internally, and why work like that

With Go 1.9 come out, this book may seems old (it use go 1.5), so there are something missing, the most noticeable is feature like module, workspace, generics. As for reflection and CGO, as the author thinks that for regular scenarios they should be avoided, hence both lack details, not as extensive as other topics in this book.

How I read this book:

  • Download the source, but try code them by self first
  • Do the practice
  • Go through the package mentioned in this book with go doc

Some related links: