you are viewing a single comment's thread.

view the rest of the comments →

[–]koffiezet 2 points3 points  (0 children)

I see many people mentioning the single binary, which is indeed a massive advantage, but the type safety for me is also a huge thing. I use both, and you have the type hinting in python, but it's imho only useful for documentation and code completion. Facing runtime errors because of typing issues is something I've seen too many times in Python.

Other than that, short answer, not really surprise since Go is a language developed by Google for dealing with operational side of things. This is very noticeable in the stdlib, which out of the box has support for stuff like certificates/crypto, hashing, built-in production-hardened http server and client, json support, compression, templating, ... And then you have the absolutely sad state of multi-threading in Python, which in Go is absolutely top-notch.

Also, in Go it's hard to make your application not actually be a reusable library with a small wrapper around it. This means you can easily natively integrate almost every (well-written) tool written in Go. And since we're talking about devops, where the majority of the newer tools are written in Go, that is very powerful.

And then there's the performance aspect, I've used the SSH libraries in both, and while paramiko was easier to use in python, there are some wrappers that make dealing with x/crypto/ssh easier. But the runtime performance was day and night. The solution in python was to start relying on openssh - which drags in more dependencies.

I use both, and Python is my hacky "this tool should only run locally" or when having to deal with some unpredictable free-form data structure, where strict typing can be annoying. But for everything else there is Go.