As touched on in a recent post about redoing this site, I recently had the (mis)fortune of using a Golang project in anger for the first time. It’s not exactly a reasoned critique drawn from years of experience, but I wanted to share some of my gripes regardless.

As a long-time Python-using dev & sysadmin, I found the following things frustrating when attempting to use, troubleshoot, understand and/or modify a Golang project (specifically Hugo, but most would apply to anything in the ecosystem):

  • Adding a build step to the development process: even a fast build step feels like pulling teeth when one’s used to a simple edit-save-run cycle; and Hugo currently takes about 5-10 seconds (!) to build on my no-slouch workstation, even with all its dependencies cached.
  • Complete lack of built-in dependency version metadata: simply inexcusable for a language developed in 2009. Third party solutions exist, but are far from widely used. This makes debugging specific versions enormously frustrating if anything in the dependency tree ever breaks backwards compatibility. (Surprise: that happens frequently!)
  • Plan 9 CLI flags: also inexcusable for such a new language. Sure, let’s use obscure -os -nobody -uses -style instead of what --literally --everyone --else -d -o -es. For a language well suited for runtime-agnostic CLI tool distribution. I can’t wait to play “is tool -ca a single ca flag or two c and a flags together?” all the time.
  • General syntactical disagreement: solely opinion, but I’m not a fan of the (much-ballyhooed) error handling, nor the total lack of quality-of-life shortcuts such as “if x in y”. (Pythonistas appreciate low mental overhead, but that’s going too far IMO.)
  • Poor extensibility: mostly theoretical, but AFAIK due to being compiled, Golang apps cannot execute user code at runtime, as interpreted languages often do. This makes tools like static site generators more limited: they can’t build extension points for users to jump off. Either it does what you want, or it doesn’t.

Until this experience, I didn’t realize how much I took Python and Ruby’s hack-friendliness for granted. Poking a Python codebase to figure out if given behavior is a bug or not, for example, is incredibly easy. I hadn’t foreseen that similar actions in a Golang project would be far more painful than simply muddling through a new-to-me syntax - but it was.