Author: David Chisnall
Audience: Experienced programmers
Reviewer: Mike James
Don't make the mistake of thinking that this "phrasebook" is just some sort of reference. This is one of the best introductions to the Go language you can find and why it is packaged in this way is a mystery.
You can expect to read this book from cover to cover despite its tiny size and being labeled as a "phrasebook". This is not a cookbook or a list of idioms in Go. It is a perfectly readable introduction to the language that has been misleadingly packaged. This is a shame because it is probably cutting down its potential readership. It has also been made physically difficult to read as the print edition is tiny by comparison with the size of a "normal" paperback.
It starts out with a consideration of why Go was need and as a justification of the new language it worked better than most I've read. From here it moves on to explain the basics of running a Go program. It explains the basic approach that Go uses to variables, type, functions and methods. Chapter 3 is on a more mundane topic - numbers but for a systems programmer the issue of numeric representation is all important.
The next three chapters continue the data theme with a look at array and array slicing, strings and collections. For a C programmer the inability to work with pointer arithmetic is a problem. How do you do clever things with arrays without pointer arithmetic - the answer is that you slice them.
Chapter 8 deals with error handling before chapter 9 introduces the all important idea of the Goroutine. After the basic introduction Chapter 10 looks in more depth at concurrency design patterns. This is perhaps the most important section of the book for the reader wanting to really understand what makes Go special and a good choice in a world of ever increasing numbers of processing cores.
After looking at concurrency, Chapter 11 is a bit of an anti-climax as we return to data in the form of dates and times. Chapter 12 looks at tile handling. Chapter 13 is on network access and Chapter 14 deals with web applications.
The final three chapters are on what you might call "advanced" and "deployment" issues. Chapter 15 is about interacting with the Go runtime, chapter 16 is about packaging code and finally we have a chapter on debugging Go. Of course Go is still a bit under-supported when it comes to IDEs and debuggers.
This isn't a perfect book - the later chapters feel rushed and occasionally you will wonder why something has been introduced in a way that makes it more difficult to follow. The author also spends a time comparing Go to other languages and if you are just looking for a reference work that tells you how to string Go instructions together you will be disappointed.
If you are looking for a quick introduction to Go and you are a reasonably competent programmer then this is highly recommended. I hope the publisher produces a revised work with bigger pages and a better title - but only a few more pages.
Getting started with Google's Go