A journey from Python to Go
medium.com
medium.com
I actually spent quite a bit of time trying out Go for a new project recently. While it's performance and deployment characteristics are highly attractive, I don't actually need that performance, yet, and it's more important that I am able to actually get things done quickly than spend 2-4x the time learning how to do it in a new language.
So, I'm sticking with Python, for now. I needed to be able to do things like test my application easily with mocks/stubbed data, and although I found plenty of information on how to do this in Go, it was obviously going to be a quite a bit of effort.
Another issue I found pretty frustrating was error-handling. So many functions return (result, error) pairs, and I found myself needing to check for error every-time I called a function. I'm not sure what the best way to handle this is - or even the "hack" to just do the minimal checking, if I'm in a rush to get something working. In Python, at least I can wrap the inside of an HTTP handler in "try/except", for example, and that will take care of any unhandled exceptions without breaking the entire server. In Go, I was not sure if unhandled errors would propagate and crash the server process, or what might happen. Obviously, I'm very new to Go, but this is just an example to demonstrate that adopting a new language comes with a lot of overhead.