ζeta

by Luka Napotnik

Confession From A Go Programer

The past 5 years I’ve used C as the default language and is the language I’m most experienced with. I’ve written complex, highly threaded TCP server software with it’s own memory management mechanisms and is required to run as close to zero-downtime as possible.

There was a decision at the company where I work that we should switch from C to Go, the relatively new programming language, which was created just for use cases like ours: highly-threaded server software. I’m now professionally using Go since summer of 2013 and am more than impressed, and so are my bosses. Less lines of code, less bugs to fix, more actual work being done, deadlines are more timely. And the most important thing: more fun!

This is how the language looks like:

package main
import "fmt"
func main() {
    fmt.Println("Hello, 世界") 
}

Not only is the language very well and elegantly described in less than 100 pages, the implementation (toolchain) is impressively useful: short compilation time, the testing, benchmarking and profiling capabilities and the documentation generator and source code formatter are lovely to use. I’ve once stumbled on a quote somewhere that says: “A good programming language doesn’t need an IDE to be useful.” That’s definitely true for Go, all you need is a terminal window and a decent editor. And the standard library provides more than enough to get one started (support for compression, x509 certificates and RPC just to name a few) without unnecessary bloat.

Here are just some of the language features I really like:

There are a lot more things to cover. But that’s for another time.