The Go Programming Language Phrasebook

Author: David Chisnall
Publisher: Addison-Wesley
Pages: 288
ISBN: 978-0321817143
Audience: Experienced programmers
Rating: 4.5
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.

 

Banner

 

In this day and age of huge over-sized books that are intimidating to even start, and hold out little prospect of ever finishing, this is a breath of fresh air. It reminds you that it is possible to write a clear and concise introduction (In a nutshell authors are you listening?) to even quite complex subjects. There is a down side of course and in this case the introduction isn't suitable for the complete beginner. You are expected to know something about another language and how useful you find the book probably does depend on how much you know about C, C++, C# and or Java. The author does tend to compare Go specifically to C and Java but as long as you know a modern object oriented language and perhaps have some idea what a dynamic programming language like JavaScript, Python or Ruby are about then you should find it easy to read. 

 

goproglang

 

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. 

Related Articles

Getting started with Google's Go

 

Banner


Mathematics for Machine Learning

Authors: Marc Peter Deisenroth, Aldo Faisal and Cheng Soon Ong
Publisher: Cambridge University Press
Pages: 398
ISBN: 978-1108455145
Print: 110845514X
Kindle: B083M7DBP6
Audience: Developers interested in machine learning
Rating: 3.5
Reviewer: Mike James
Lots of people need to learn the math behind mach [ ... ]



Go Programming In Easy Steps

Author: Mike McGrath
Publisher: In Easy Steps
Date: January 2021
Pages: 192
ISBN: 978-1840789195
Print: 1840789190
Kindle: B08NF958NM
Audience: Non-programmers wanting to learn to code in Go
Rating: 5
Reviewer: Mike James
Getting going with Go - great idea!


More Reviews

 

Last Updated ( Tuesday, 19 March 2013 )