3 ms·
I don't think that performance is the key reason to switch from Python to Go (although it is nice): as someone who switched from Python to Go, what really made
by eadmund 9y ago
I don't think that performance is the key reason to switch from Python to Go (although it is nice): as someone who switched from Python to Go, what really made it worthwhile for me was knowing that my code is significantly more likely to be correct when it runs. Go's typing is much nicer than Python's, for this use case.
Performance is just gravy.
- weberc2 9y agoI hear that. I work in Python, but prototype most things in Go, simply because many classes of problems benefit from the additional structure, and a compiler that can reason about that structure. Also Go has excellent tooling, it has great libraries, it compiles to static binaries, and anyone can read it. I'm hopeful about Python's type checking though, but so far it leaves a lot to be desired (absolutely no recursive types, lots of bugs, strange restrictions, confusing for variables, etc).
- thesmallestcat 9y agoType errors/misuses aren't my biggest problem and Go's type system isn't very powerful. The Python code is smaller, more expressive, easier to review, etc. I have more confidence in the correctness of pylinted Python code. I wouldn't jump to trade conciseness for compile-time type safety, particularly for applications, because it's easier to create/not see a logic error in heavy code. And depending on what you're doing, Python's type system may be more powerful/appropriate.
- deleted 9y ago[deleted]
- luord 9y agoThat's subjective, and part of the sixty-year-old flamewar known as "dynamic vs static". You like to write the type of your variables next to them, all the power to you. I don't or, more exactly, I prefer the little extra flexibility of not having to do that.