Back

reviewed The Go programming language by Alan A. A. Donovan (Addison-Wesley professional computing series)

Alan A. A. Donovan: The Go programming language (2015) 5 stars

The authoritative resource to writing clear and idiomatic Go to solve real-world problems

Google’s Go …

Review of 'The Go programming language' on 'Goodreads'

4 stars

My attitude towards Go in the past has been one of superior contempt. After all, I had visited the higher planes of programming, where one can see macros and monads in their full brilliance, and thus relegated Go to the unwashed masses. On the few occasions I had used it--alas, professional programmers are merely mercenaries--it was surprisingly easy to write. Almost enjoyable. But no, I had seen the pure snows on the peaks of the Olympian mountains of abstraction. Once you breathe the rarefied air of higher abstraction you can't wallow in the mud that is programming in lesser languages. So I continued to look down on Go and its users.

I have crossed paths with this book a number of times. I leafed through it, I even read the introduction, but I never picked it up properly. This changed because, of all things, a book on Zen Buddhism. You see, the book explained, us westerners are prone to dual thinking (thanks a bunch Plato and Aristotle). We like to think of things in clear cut categories (heh): black-white, good-bad, superior-inferior. Gradually, as I made my way through that book, I realised more and more that I'd been a victim of this dual way thinking myself! And what better way to step out of it than trying a language I had labeled as "bad", "inferior" and a bunch of other hasty cargo culted generalisations? So I ordered "The Go Programming Language" (GoPL).

Let me say it upfront: GoPL is a good technical book. This is how a book introducing a programming language should be written. It treats the reader as an adult (even more so, as an engineer!). Go is rooted in the Unix world, and the authors want you to know that, God dammit. It doesn't use cutesy examples with meme names for variables. The examples are very much the seeds of applications you would use in the real world (also known as "tools" in Unix parlance). The nature of the Buddha is continuous.

You can see this is a "Kernighan"--if we can use painters' names as nouns, we can use authors' names as nouns! The book's structure and exposition style echo those of "The C Programming Language" and "Software Tools (in Pascal)". The authors don't shy away from using programs they've written in earlier chapters to illustrate the behaviour of later programs. They even gasp compose them in shell pipelines. You see, the truth is GoPL also moonlights as a Unix philosophy book. And it does a great job at it. If you're so inclined, you'll learn more from this book than all the "do one thing and do it well" blog posts out there.

The examples are engaging. The first chapter is a whirlwind tour of Go and its standard library. And it's a very convincing one. It even has pictures of pretty 3d graphs. In the browser! Oh boy, tell me more about this Go thing you're talking about. The rest of the chapters treat one topic at a time. Most of the times in depth. The final chapter, the one on unsafe programming, is a glimpse of the dark world of juggling with chainsaws. And an admonishment to not do so lightly. The authors even have the audacity to lightly bash C. You can't run from your past Mr. Kernighan!

And I can't be sure, but I think the authors were reading my mind, because whenever I had a question, the answer was close by--in the next paragraph or the next page. Seriously, it's a well organised book.

One thing I appreciate is that the authors are honest when they take shortcuts (lack of error checking, brittle practices) in order to save space. If only all programmers would be this honest.

But this review is getting long, and a mercenary's day is busy. Glue code doesn't write itself. So, should you read this book? The answer depends on what you're looking for.

Do you want to learn Go? What are you waiting for? Go for it!

Do you want to write an introductory book for you own language or favourite language? Steal this book!

Do you find Go uninteresting, but you're one of those weirdos who reads technical books just because? Give it a go. You might even change you opinion about the language by the end of it.

Do you want to dine with the gods from the ambrosia of pure abstraction? I'm afraid you're out of luck. But hey, at least you'll get a taste of what passes as programming amongst us, the unwashed masses.