That’s an interesting question! Python has been my go-to language for years as well. Nowadays I would do anything nontrivial in Go. The specific reasons in this case would be something like;
-
Deployment. Using Go, I get a statically linked binary and I can crosscompile it for Linux, Windows, FreeBSD etc from my Mac. There are no dependencies. None. Python would be more painful to deploy, especially on Windows, and wouldn’t really feel at home there. Well, as much “at home” as any command line application does, but still.
-
Concurrency. This is the big one, language wise. In Go it’s trivial and cheap to spin up “goroutines” (similar to green threads etc) and there are some very nice language structures to communicate data safely between routines.
-
Fun. I quite recently started playing with Go and it’s the most fun language for me to do anything in at the moment. This project is for fun, so that matters.
Then there’s a whole bunch of smaller things and intangibles that make up the “why” of why I think Go is a nice and fun language to work with. A certain minimalism compared to many other languages, the cohesiveness of the standard library, and a kind of harsh pragmatism / asceticism in the thinking around what features to include and not, how to handle errors, etc that appeals to me. And yes, It’s probably faster, at least in some parts, although Python can be plenty fast as well (especially the parts of it that are actually C). (The GIL specifically would probably not have been an issue; the concurrency in syncthing is mostly the waiting-for-many-things-simultaneously kind rather than spinning all the CPU cores at the same time.)
Edit; So I don’t think there’s anything in particular that would prevent you from writing a version in Python. I’m sure it would work fine. But I’m not sure it would provide any huge advantages over the current approach. It would be much cooler if someone wrote up the core mechanics in Objective-C or C# or something that could genuinely go places Go doesn’t…