Go Language
Go is just over ten years old but still feels like a newcomer on the block (probably due to my old age). It was designed at Google by Griesemer, Pike & Thompson. These guys are veterans. Thompson is well known for his work on a discarded PDP-7 which became the foundations of Unix and known for his work on the B programming language, arguably the forerunner to C. Later he worked on the Plan 9 Operating System. Pike wrote the first graphical terminal software for Unix and was heavily involved in Plan 9. Griesemer worked on the Chrome JavaScript engine (and many other things).
Programming in Go feels sufficiently flexible but at the same time the compiler is quite insistent on strong variable types and removing unused variables. For example, you cannot compare an integer with a floating point number without converting one of them. This is by design and is to prevent you from getting into trouble. Discipline. Here are some useful resources for Go.
- The main Go website with downloadable packages, documentation, and lots of very useful stuff indeed.
- The GNU Compiler Collection, which includes a Go compiler.
Is there any difference? My preference is to use the official one when I'm programming on my Mac. I have both installed on a Raspberry Pi but I've yet to do any tests to determine differences. By default, the official compiler outputs a static binary and GCC outputs a dynamically linked binary (requiring the Go library).
- O'Reilly's Introducing Go. You can easily read this book in a weekend and get a beginner's grasp of Go. (Also available on O'Reilly directly of course.)
- The Go Programming Language, Donovan & Kernighan, Addison-Wesley. Kernighan's involvement in such a book excites me. His book with Ritchie on C is a classic and is incredibly easy to read.
- Once you've had an introduction to Go and seen concurrency on paper, this video by Rob Pike explains how to use it in Go with examples.
- Learn how to code Google's Go Programming Language (Udemy) - a comprehensive course of 46 hours. I dipped in and out of this to reinforce what I'd learnt from the books. Keep an eye out on Udemy for discounts for this course.
Here are suggested directions to go further:
- gg, a 2d graphics library. This makes it very easy to draw graphics and output png files. I used it early on in my Go learning to output The Mandelbrot Set.
- Web Development with Go (Udemy). Once you have the basics, this course will tell you how to use Go for web applications.
The Go Gopher mascot (pictured & as the featured image was designed by Renee French and is used under the CC 3.0 Attributions license.)