I first got involved with got a year or two ago. I needed to parse HL7, no, not the nice version. The gross version. Version 2.x.

Anyway, I digress, there was this decent library out there with 70 odd github stars. I remember looking at this and thinking, you look like C. But fast forward a bit and do I ❤️ Go. Certainly it’s a little to get used to, depending on what languages your used to

It’s simple

This is often peoples biggest love and gripe about it. It’s so simple, so simple things like map, filter, reduce don’t exist. So if you’re coming from languages that have them. Say goodbye to those. It only has ~25 keywords and ultimately Go it a simple language, but probably more verbose than you’re maybe used to. But once you get used to that, there are some surprising benefits.

Standardized formatting

Gofmt’s style is no one’s favorite, yet gofmt is everyone’s favorite.

Rob Pike said this years ago. But because it has one formatter, everyone’s structure looks the same, which brings some really nice familiarity with external libraries.

All code generally looks the same

Following on from the above points. Because it has so few keywords, there are less ways to do things. That coupled with the formatter means you don’t get the kinds of scenarios where you have a Scala dev come to a Java project and now portions of your code looks like Scala, some Java and some maybe some other language. This is probably my favorite side effect of Go.

It’s easy to get going

You can feasibly learn Go in a long weekend. That’s not to say you’re a master at it, but you’d be in a decent place. There’s not many main stream languages you can do that with.

Concurrency

Go is famed for its concurrency. Go’s concurrency is great, but concurrency is not that easy to master. But Go makes it a lot easier and handles a lot of the minutia for you.

Go routines

Go routines are so small, it’s generally ok to create 1000s at a time and you probably won’t even notice.

Cyclic imports are not allowed

This helps keep Go programs dependency graph small.

No unused variables

Most languages don’t care about unused vars, or they at most throw a warning. Go simply won’t compile.

Truly cross platform

Go runs on all platforms with very minimal work

Go is FAST and lightweight

Go is very fast and produces very small static binaries. This is great for things like Docker. I use a scratch container and just copy the binary in. Resulting in an image of ~5MB. Give or take the size of your project.

The Standard Library is excellent

It really is amazing. You can feasibly write a massive, highly performant system without using anything but the standard library.