Hacker News new | ask | show | jobs
by capo64 2877 days ago
I’ve been writing Go at work for about a year now. I have built a VoIP gateway, an HTTP API, an SRGS parser, and a modified beam search algorithm for a deep learning speech to text pipeline. I would say there are a few moments along the way where it started to click how awesome Go is (the only reason I chose it in the first place is because it was the only internal SDK I had access to).

1. The first time I had to design a concurrent module. Goroutines and channels are amazing. In most cases you still need to dress them up a bit, but the first class support makes it really easy to start simple and add as needed. In fact, as I type this I feel that that is a general theme of the language. It kind of urges you to start simple and iteratively improve things.

2. Cgo. Cgo has a lot of mixed opinions, but I am on a team with very few resources, so my output in terms of volumes of code is limited. I have been very thankful that I could both link in existing C dependencies into my project, and also build my project as a C library for other existing projects. This again, allowed me to start small, and slowly rewrite the important pieces in Go when it was worth it.

3. Pprof. That tool is amazing. There’s some really good YouTube demos of it so I won’t go into detail about it, but particularly for algorithms, this tool has helped me speed up certain parts of code by a few orders of magnitude, essentially making them practical for real world use.

4. The build system is fantastic and very fast (when compared to the aforementioned C / C++ projects)

There are definitely more reasons, but I love Go primarily because it feels like one of the most pragmatically thought out language that I’ve ever used. It has lots of tooling and features that make it fast to build working, robust, and fast software. It may lack some syntactic sugar and certain language features that allow you to make clean, gorgeous abstractions, but it’s a trade off that I care less and less about every day that I use Go.