Developer Love for the Go Programming Language

This Week’s Testimonials

Tobias “Tobi” Lütke and the Go Gopher.

The Go programming language has recently been getting some developer love. My former boss’ boss, Shopify CEO Tobias “Tobi” Lütke, tweeted on September 12th:

While much of Tobi’s time is centred around the sort of activities that you’d expect a CEO to be involved in, he’s still a coder at heart and manages to make to not only only code; he even occasionally pair programs with developers at Shopify. According to tweets he made later, both of his Go projects were for Shopify’s infrastructure and a lot of what he likes about go is what the language doesn’t have.

Tobi’s initial tweet about Go was cited in the GigaOm article Will Go be the New Go-To Programming Language?. Also quoted in the article is another techie CEO, Derek Collison of the PaaS startup Apcera, who tweeted:

A day after Tobi’s tweet, O’Reilly Radar posted Why We Need Go, an article featuring a video interview with Google developer, Canadian geek, co-creator of UTF-8 and one of the co-creators of Go, Rob Pike:

A couple of days after that, Jordan Orelli posted Why I Went From Python to Go (and Not Node.js) on his blog. As a Python programmer searching for a suitable way to write concurrent server-side code, he was disappointed with his options:

…concurrency is possible in Python, but it is an awkward affair that often feels bolted on, fractures the experienced Python programmers into different factions (Twisted is better!  No, Tornado is better!  Wait, you’re both dumb, use Brubeck!), and confuses the inexperienced Python programmers.  To say that concurrency is possible in Python, but it is not idiomatic in Python, would be an understatement.

He also tried Node.js, but as he puts it, “I’m happy that the notion of concurrency is put front and center, but now parallelism feels bolted on.”

A recommendation from Patrick Crosby (former OKCupid CTO, founder of StatHat, which is built in Go) led Orelli to Go, and he writes “and I’ve never looked back.”

Why Go?

  • Go, a Jordan Orelli observed, has concurrency baked in. When written idiomatically, Go’s compiler creates applications that run concurrently and scale to various architectures. On single-core machines, the compiler time-slices; on multicore machines, it distributes jobs across threads.
  • Go features goroutines (a play of words on coroutines), which are like functions that complete asynchronously. Communications between goroutines is done explicitly via strongly-typed input and output channels that limit interactions between threads. Goroutines are also less memory-intensive than C threads by orders of magnitude, allowing your program to perform more parallel operations on the same architecture.
  • Go was designed to reduce the clutter that has crept into a number of programming languages with a simple syntax, lean keyword set, and the elimination of archaic things like header files, forward declarations and “stuttering” such as foo.Foo* myFoo = new(foo.Foo).
  • Go feels like the love-child of Python and C: high-level and rich enough so that you’re not doing so much yak-shaving, low-level enough for speed and control.
  • It compiles really quickly, even with large programs. This may be a minus for some programmers.

How to Get Started with Go

The starting place for all things Go is the Go programming language site, which features downloads for various OSs and architectures, documentation, the “Try Go” experimentation sandbox and other goodies such as this introductory video:

Addison-Wesley has a couple of books: Programming in Go and The Go Programming Language Phrasebook. I’ve got the Phrasebook, and it’s a great way for someone familiar with programming and C-syntax languages to quickly get up to speed with Go programming.

Other resources include:

2 replies on “Developer Love for the Go Programming Language”

I’d Go for Scala instead. It is more mature and has a very powerful type system with inference, pattern matching, and lisp like macros, which makes it excellent for DSLs. It also has an awesome collections library and IDE support through Eclipse. Compared to Go, it has a large ecosystem including many high level database libraries and several web frameworks, plus Akka which is inspired by the Erlang OTP. Then you add on everything that is available for Java, which is almost everything, and I believe you get the most practical of the up-and-coming languages. Downsides are some issues with multi-version binary compatibility due to the API still stabilizing. Also, it’s called Scala because the language is designed to scale from newbies and simple scripts to FP wizards and complex frameworks (capacity scaling is more about architecture than language.) That can make the learning curve of your code base steep.

Node.js is for people who haven’t learned their lessons from using Twisted.

Comments are closed.