Skip to main content

A Basic Go Setup

In this article, I wanted to share the setup I use for writing data science programs in Go. I’ve found it very easy to get started with this language, but thought it might be useful to describe the setup.

I use both Linux and a Mac, so this article will describe those platforms, but Go should work well on Windows as well. In any case, we assume that you are comfortable running the command line.

Why Speed Matters

The vast bulk of data science work is done using Python and R, and that’s fine. Those languages are well suited to analytics, and make available a rich infrastucture of libraries and documentation.

Looking at just Python (R is similar), there is however a problem. Python is slow, due to its interpreted execution model and dynamic typing. As a Python program runs, it is constantly checking for the types of different variables and data, and for the feasibility of certain operations such as converting data types and expanding lists. While this makes for fast development and prototyping, it can be very slow for some types of analysis.