mg website logo

It's Go Time

July 22, 2024

It’s been a while since I’ve really played around with a new language. I’ve been working with TypeScript (happily) and Python (not so happily) for many years now, and spent most of my learning time exploring things like mapping, databases and tooling instead of other languages.

So now I’m learning Go! The truth is I actually ‘learned’ Go back in 2015, at least enough to get by and make a few fairly simple web APIs. But that was 9 years ago and I’ve learned a lot about software since then.

I’ve been impressed so far by how easy Go is. I’m only two days in to learning right now, but it’s a very easy language to read. The docs are great and having formatting built in goes such a long way towards helping get oriented across projects. The type system is also easy to work with, though that may be a product of coming from a JavaScript and Python background where types have historically been an afterthought. The defer syntax is great. I have yet to get deep into concurrency with Go, but it looks to be as simple as other parts of the language.

Without much guidance, I’ve been able to convert some data processing scripts over from TypeScript and set up a simple API to serve that data. I even got my scripts running as a nice little CLI that I can run as a binary. This didn’t take any wild configuration or extra head-scratching, it just works. Plus it’s fast!

One pain point so far has been handling JSON, which takes a lot more work in Go compared to JS. Maybe I don’t yet understand the best way to do this? The way Go handles JSON is not inherently bad though, as it makes you be more explicit about your assumptions. Besides, using LLM tools like Copilot and Claude have made it trivial to create structs from a sample of JSON data, as well as refactor as needed.

So far, my overall impression is that Go is really simple, which makes it pretty enjoyable to work with. It just feels intuitive. The simplicity of the language also encourages me to write simple code and think deeper about how my programs are structured. I love that I can just focus on building things, even as a beginner to the language.


Written by Mike Guida who enjoys prolonged outdoor adventures and building stuff with software. Follow him on Twitter