8 ms·
I have experience with both (and a lot of other languages) and honestly - I wouldn't move from Python to Go. I'd move from Python to the very latest version of
by radicalbyte 4y ago
I have experience with both (and a lot of other languages) and honestly - I wouldn't move from Python to Go. I'd move from Python to the very latest version of C#.
You get far better tooling, excellent performance, the ability to write extremely concise code (as long as you don't apply mainstream coding standards/style) and a better range of libraries for most situations than Go. More chance for re-use too (i.e. same library for mobile apps, websites via web assembly, backend and apps for all major PC platforms).
Also - the leaders of both Python and C# are coworkers - they both work at Microsoft.
- systemvoltage 4y agoTo me the biggest advantage Python has is the debugging capabilities. Especially combined with PyCharm, ad-hoc interpreter to check things while the execution is at a breakpoint – this is just like cheating. It is too good. I am not an expert software developer and haven't developed anything that needs to be fast, but for my needs, Python is really awesome. That said, I want to learn Go properly.
- bloblaw 4y agoGo debugging is nearly the exact same experience as Python. GoLand (from JetBrains ... same folks that make Pycharm) or VSCode with delve debugger work flawlessly. I don't think there is any difference between Go and Python when it comes to debugging. Support for both is widespread and high-quality.
- haihaibye 4y agoThe post you replied to mentioned an interpreter. Does Go provide an interactive REPL?
- radicalbyte 4y agoYou don't really need a REPL with an IDE, you have excellent auto-complete which shows you the API (which is what I use the Python REPL for) and are unless you're writing pure framework code (or mapping etc - in which case integration testing gives more bang for the buck) then you're probably writing unit tests. I use a continuous test runner for those as the feedback is amazing.
- haihaibye 4y agoAPI autocomplete and unit tests are not a replacement for a debugger, it's a separate use case. Being able to evaluate code while in the middle of a breakpoint is extremely useful. You don't need to say it doesn't matter. Your language has features Python doesn't have, there can be tradeoffs
- bloblaw 4y agoNot natively, but there is a community developed one called gore: https://github.com/x-motemen/gore https://github.com/x-motemen/gore
- hardware2win 4y agoIn c# you can edit code at fly when debugging, jumping between lines, evaluate expr and more like conditional breakpoints
- kaba0 4y agoNot sure about C#, but Java has a similarly good debugging story.
- watersb 4y ago> extremely concise code (as long as you don't apply mainstream coding standards/style) I'm interested in this aspect! I discovered that I was able to write short scripts in PowerShell in a style I find readable, or I can add extra stuff (parameter annotations, mostly, IIRC) and it can stretch to look like the C# I see in Microsoft API documentation. I find that the idea just gets buried. So I need to revisit C#, to find out how much can be effectively elided.
- radicalbyte 4y agoThe language has evolved greatly in the last few years. With LINQ and generics it was already nice but add on all the recent syntax sugar and ideas stolen from F#.. and you can write very nice code. Not all code will be though - we have a lot of Java-minded people in the community (who port Java libraries/frameworks) and they tend to be... ugly..
- metaltyphoon 4y agoI have a feel that most people that use Go haven’t had a chance to write code for the Government where its audited. Pulling third party packages would be instantly flagged and be put under high scrutiny. Meanwhile with C# and .NET’s ungodly framework size you can just cruise along because it’s made by the creators of the language.
- bsdnoob 4y agoGo has a pretty decent standard library, you can go really far without adding a single third party library.
- christophilus 4y agoI've worked extensively in C# (for the first 15 years of my career, it was my primary language), and built a handful of projects in Go. They're mostly comparable in terms of dependencies. The average C# project I was on-- in the last few years I worked in it-- had roughly the same number of Nuget dependencies as the Go projects I've seen. Both languages are great in this regard-- you can do a whole lot without 3rd parties.
- prepend 4y agoIt’s not much of an issue as long as you document your third party packages and versions. It’s all going through an SA&A process that will check your c# framework as well as your random package downloaded from the interweb. (based on the decent amount of audited government work done using tons of third party libraries. Just try doing anything in data science without third party packages)
- jitbit 4y agoThis. I write in several languages (mutli-lingual project: C#, Python, JS/Node, JS/Front etc) and C# provides the best experience by far. Everything you said above plus BIG community. C# is the top #4 language on StackOverflow, it's even more popular than PHP and HTML. By comparison, Go is not even among the top #50. I'm not saying Go is a bad language, just bare numbers. Every problem you're going to bump into with C# - has been arleady discussed and resolved already. P.S. latest .NET-core beats C++ in some benchmarks I love that