The Go Programming Language

Author: Alan A. A. Donovan and Brian W. Kernighan
Publisher: Addison Wesley
ISBN: 978-0134190440
Print: 0134190440
Kindle: B0184N7WWS
Audience: Programmers
Rating: 4
Reviewer: Harry Fairhead

Can Brian Kenighan do for Go what he did for C?

Brian W. Kernighan wrote the classic guide to C, back in the days when it was a new language, co-authoring it with Dennis Richie one of C's creators. There is a lot about Go that is similar to C, and indeed this book has similarities to the classic "The C Programming Language" beyond the form of the title. It has a concise presentation, but not quite as concise as the classic C book, and I found myself wondering if it is a difference in the languages. It has a slower pace and there is a lot more to read.

"The Go Programming Language" also isn't aimed at the complete beginner. The aspects of the language are introduced as if the reader was a knowledgeable programmer in some other language and just wanted to get the facts of Go sorted out. The examples are often very math and science based - Lissajous figures, Mandelbrot sets and so on.  


The book starts off with a tutorial tour of Go as a language. It covers command line arguments, creating animated GIF and fetching URLs and even implementing a simple web server. Of course these things have more to do with using the Go libraries than the details of the language itself.

After this the book goes though the standard sequence needed to document a language:

Chapter 2 Program Structure

Chapter 3 Data Types

Chapter 4 Composite Types

Chapter 5 Functions



The book takes a step up in abstraction at Chapter 6 Methods when it explains how object -orientation works in Go - some might argue that Go isn't object oriented but the way that it associates functions with particular data types is a core concept in object programming.

Chapter 7 Interfaces has some big examples - expression evaluator and a token based XML decoder.

Chapters 8 and 9 describe Go's approach to concurrent programming - goroutines and channels. Here we meet some of the difficulties of concurrent programming in any language - race conditions, mutex and so on.

Chapter 10 explains packages and the Go Tool; Chapter 11 does the same for the Go test tool. The penultimate chapter explains reflection and some meta programming techniques.

The final chapter is where all the bodies are buried. It is a discussion of low level programming - unsafe code, memory layout and calling C code from Go. This is the sort of coding you hope that Go can keep you away from, but for some tasks it is probably still unavoidable.


This book was easy to read but I couldn't avoid a comparison with the original classic K&R book on C. I learned C from the K&R book and I did it over a weekend. I might not have instantly acquired all of the techniques I would learn about in the years to come, but after reading it I was happy that I could program fairly well in C. It was the almost instant transformation to a C programmer that made the book remarkable. Of course it might have just been that the language was built right.

I can't say that this particular book has transformed me overnight into a Go programmer in anything like the same way. It is concise, but there is so much more to say and it spends a lot of time dealing with the rough edges of the language. After reading it you can probably write Go programs, but probably not with confidence - there is too much to remember.

Another problem is that the book doesn't really sell the idea of working with Go. It doesn't explain why Go's approach is so much better, in fact it hardly points out what is special about Go at all. As Go's selling points are not self-evident, this is a failing. I also have to warn you that Go has moved on since the book was written and there are some new features which are ignored - not a big problem but you need to know.

It is a good book, but not up to the standard of K&R.

To keep up with our coverage of books for programmers, follow @bookwatchiprog on Twitter or subscribe to I Programmer's Books RSS feed for each day's new addition to Book Watch and for new reviews.


Foundational Python For Data Science

Author: Kennedy Behrman
Publisher: Pearson
ISBN: 978-0136624356
Print: 0136624359
Kindle: B095Y6G2QV
Audience: Data scientists
Rating: 4.5
Reviewer: Kay Ewbank

This book sets out to be a simple introduction to Python, specifically how to use it to work with data.

Learn dbatools in a Month of Lunches

Author: Chrissy LeMaire et al
Publisher: Manning
Pages: 400
ISBN: 978-1617296703
Print: 1617296708
Kindle: B0B39PCHL8
Audience: SQL Server DBAs
Rating: 5
Reviewer: Ian Stirk 

This book aims to make it easier to manage your SQL Server estate, how does it fare? 

More Reviews

Related Articles

A Programmer's Guide To Go With LiteIDE

A Programmer's Guide To Go Part 2 - Objects And Interfaces

A Programmer's Guide To Go Part 3 - Goroutines And Concurrency

Getting started with Google's Go

Last Updated ( Tuesday, 05 December 2017 )