Golang – The Okayest Programming Language

Note: This is a repost (and expansion) of my quora answer here

Someone on Quora recently posted a question asking for developers to discuss their negative experiences with Golang.  That got me thinking about my past (and current) experiences with the language, and I ended up replying with a list of pros and cons:

It’s hard to hate Golang. It’s also hard to love Golang. It has got to be the okayest programming language I’ve ever used.

Things I like about Go:

  • The development environment: Simple to get set up and use. I usually work in Javaland and have had to suffer through Ant/Ivy, Maven, sbt, et al., so Go’s environment feels much more thought out and coherent by comparison.
  • No need for an IDE – Java development practically requires the use of an IDE to be productive (as much as I like IntelliJ, I resent having to keep a heavyweight IDE running all the time). I routinely edit Go source files in vim and compile/run/test all from the command line. Which is nice.
  • It isn’t Object Oriented (OOP has its uses, but I hate, and I mean hate the everything-is-an-object paradigm in Java). Object-Oriented Design (the raison d’être of Java) in particular needs to die.
  • Channels and goroutines. Not a terrible way to do concurrency. Nicer than managing threads in Java. Not as powerful as Clojure or Akka (but definitely simpler, at least in the case of Akka).

Things I don’t like about Go:

  • I’m a big fan of functional programming (I use Clojure or Scala on the JVM whenever I can get away with it). Golang isn’t a functional programming language. This is more a problem with me than Golang, I suppose 🙂
  • Lack of some advanced programming constructs. Generics, in particular, are something I miss, especially given my last point:
  • The type system. It’s clunky, limiting, and just feels so antiquated. Easily the worst type system of any language I’ve used in the last 20 years. Ada, for example, has the best static type system I’ve ever seen. Scala is pretty decent as well. This is the main reason I only use Go for small utilities and can’t stand programming large projects with it.

I don’t have a lot of optimism anymore about the future of Golang as a general purpose language.  It seems to be carving out a niche for itself in network services (it’s become especially popular with fans of ‘microservices’), but I can’t see it expanding much beyond that.  It’s not really suitable for use as a systems programming language (better to use something like Rust or even good ‘ol C), and I certainly don’t see it displacing Java in enterprise environments.  As for myself, I’ll continue to use it here and there when it suits the problem I’m working on, but it’s not going to be my “go to” language for general use (Clojure fills that role for me at the moment).

Leave a comment