Hamsters are Cool: I Love Go

So my latest programming love is the Go language. This is not an entirely rational love, as it is at its core a programming language and as we know, all programming languages suck. But Go somehow manages to suck less than others.

Part of it is the simplicity of the language. It is fun to program in in a way a lot of other languages aren’t. Its structure and syntax are easy to understand and flexible. It treats functions as first class citizens, it prevents you form over importing, it has a really robust standard library, it has an easy means of brining in other libraries, it has an easy means of install other libraries. It is complied so that it runs fast on every machine, but it also supports the “go run …” command, so that it feels close to an interpreted language. Composition as a base for the object model makes a lot of sense, the map feature is well built, flexible and easy to use. The Struct constructs are easy to use and combining them with interfaces to create objects is a great method of OO programming, in my opinion. It allows you the flexibility of pointers, but still does a decent job of garbage collecting. Its concurrency model is very nice, powerful but easy to control.

It is just fun to work with: getting things done doesn’t feel like I am beating my head against a brick wall like it can with overbuilt languages like Java and C#. But it also has the same feel as working with interpreted languages like Perl. It compiles fast enough, and the files and packages can be atomic enough, that working with Go can feel almost as agile as something like Perl or Python. It also comes from what I think of as the “Unix” style of programming languages.

In the Unix style, programs and libraries are small and discreet. It is possible for one programmer to write and understand multiple programs or libraries. System are built from smaller components and treated with the respect they deserve. The “enterprise” method of building programs is different. Java is a good example: Java programs have many programmers working on them, with complex and complicated frameworks and libraries dominating the program. The end result is one large, monolithic and often not entirely understood programs.

I obviously favor the Unix style, and Go fits into that family nicely. It is not overbuilt so building programs is more discreet and much more about solving the problem rather than beating the frameworks into something resembling the shape of the solution. It should be possible, I think, for one programmer to build a moderately complex web service, for example, in a way that would be much more difficult in a language like Java. That is the nicest thing about Go: it’s an enterprise ready language that is fun and efficient for programmers.

Hamsters rock. Who knew?