Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I learned JavaScript in 1999, PHP in 2003, Ruby in 2009, Python in 2015, and Golang in 2018. Modern PHP (despite its historical reputation) and Python are pretty much a toss-up to me (both have warts, both are a blend of functions and objects, and both can be written very well or very poorly). Ruby and JavaScript are more elegant (I like how everything is an object), but Ruby has historically been very slow and JS developers have forgotten how to program (see left-pad, or the dumpster fire of npm modules).

In July 2018, I decided to go all-in on Golang. I like how fast it is, I like that it forces me to pay attention to my types. I wish that error handling felt less like yak shaving, but I understand the rationale. I write task-oriented servers/daemons, and CLI tools mostly, and it's great because it compiles down into a single binary with zero dependencies (which none of my other languages can claim), and it's extremely fast. It compiles easily for a variety of OS/Arch combinations, and as someone who can follow instructions to compile C/C++ code, dependency management is FAR easier than having to track down which "dev" versions of packages I need to install from whatever flavor of Linux or on macOS (via Homebrew). Overall, it's the best of many worlds for producing something that's easy for other people to consume.

These days, I do a lot with AWS, Docker, Security, Terraform, etc. I'm also going back to my web roots a bit on the weekends and looking at building a GraphQL API on top of DGraph, and the tooling for Go is really good. Lots of static analysis and linting tools are available to help me write the best code I can, and teach me when I've done something poorly.

My only big complaint is when I'm parsing JSON of which I don't know the shape. I end up with this nested mess of `map[string]interface{}` types that I have to sift and cast over. Even when I know the shape ahead of time, I still need to do the work to model it as a struct before I can work with it sanely. This is something that JS, PHP, Python, and Ruby all do with far more ease.

I still write in multiple languages frequently, but Go has become my go-to for a lot of things over the past couple of years.



When you know the shape, you can just use https://mholt.github.io/json-to-go/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: