Thursday, March 24, 2016

Go

In the very small amount of spare time that I have at the moment, I'm learning to program in Go, with a short-term goal to write some performance testing utilities for work and a long-term goal to make it my second go-to language after Perl.

The reasons I've chosen Go are pretty simple:

  1. Healthy ecosystem. There are tons of libraries, lots of articles, plenty of discussion and frequent updates to the compiler.
  2. Simple concurrency primitives. A lot of the problems I'm dealing with at the moment need to be approached with concurrency in mind. Goroutines and channels fit a lot of these problems really well.
  3. Statically linked executables. This is really nice to have. It means when I write performance testing utilities for work, they are easily deployed and run on all kinds of machines, whether they're for one product or another or whether it's a production or development environment. It means I can avoid any runtime dependency hell if there are subtle environment differences between machines and it means I don't have to change the state of the machine just to run my code.
  4. Composition over inheritance. It's a personal preference, but I hate inheritance once it grows beyond a couple of layers.

Now, just wait a few months and I'll write a blog post titled "what I hate about Go" :)

No comments:

Post a Comment