4 ms·
The idea that people move from Python specifically to Go is one of those chestnuts of conventional wisdom that never receives any kind of backing in actual data
by pekk 12y ago
The idea that people move from Python specifically to Go is one of those chestnuts of conventional wisdom that never receives any kind of backing in actual data.
If you think that Python and Go are made for the same tasks then you're really confused.
- gillianseed 12y agoWell the article referred to actual posts by 'people including whole startup teams blogging about switching from python to go' (somewhat paraphrasing), which has indeed occured.
- reuven 12y agoRight. Students in my Python classes (who typically come from static, compiled languages) are always asking me how quickly certain operations execute, or how much memory is used. I try to explain to them that obviously Python developers care about these things, and I show them some of the most common pitfalls. But this isn't the first, or even fifth, thing that you think about when you're coding in Python. The key thing to remember with dynamic languages, and particularly interpreted dynamic languages, is that they're optimized for programmer speed, not execution speed. And that's fine nowadays, when programmers are expensive and computers are not. So yeah, maybe Go will run your program 100 times faster. And there are cases when that's important. But in most cases, it's not, and the benefits that you'll get from having a happy, efficient developer will be more than worthwhile.
- enneff 12y agoSpeed is low on my list as to why I prefer Go over Python. (In fact, Go isn't necessarily fast. It's just that Python is unnecessarily slow.) Having a decent type system and decent concurrency primitives are far more attractive.
- reuven 12y agoI've never found myself wishing for a better type system, although maybe I've just been steeped in the world of dynamic, strongly typed languages for too long. But there's no doubt that concurrency is indeed one of Python's weak points, and Go's strong points.
- kazagistar 12y agoI never found myself wishing for a better type system, because my idea of "static" typing came from C and Java, where it is mixed up with variable declaration, state, and a bunch of other things it has no right to be associated with. Basically, I was scarred. A good type system quietly and with minimal programmer effort encodes and documents your code, helps you find mistakes faster, guides your re-factoring, and gets out of your way when you don't want to deal with it.
- ekianjo 12y ago> It's just that Python is unnecessarily slow. It's not Python that's slow, it's CPython. If you use PyPy you get a much faster implementation of Python, not too far from Go speed.
- mimighost 12y agoIHMO, PyPy isn't a strong counter-argument for Python's slowness. Yes, PyPy is probably faster than CPython. But what then? In most cases, CPython is THE PYTHON. PyPy is still in its early age and has a lot to demonstrate itself as a serious alternative to CPython. On the other hand, programmer could get out-of-box performance boost from adapting Go without worrying the potential compatibility issues. PyPy is a very interesting and promising project. I highly respect that. I just don't like the idea of merely using it to dodge the blame of performance slowness, when what people are really talking about is CPython.
- Daishiman 12y agoI would say Go's type system is the least impressive of its features when compared to most other statically typed languages.
- Istof 12y agobut for an interpreted dynamic language, python is particularly slow when compared to other popular ones (for execution time).
- the_mitsuhiko 12y ago> The idea that people move from Python specifically to Go is one of those chestnuts of conventional wisdom that never receives any kind of backing in actual data. A big reason for this is that some prominent members of the Python community left for Go and that Go talks have started appearing at Python conferences.
- tejinderss 12y agoDon't you think that people should rather consider Julia or even Java instead of Go as Python replacement?
- coldtea 12y ago>The idea that people move from Python specifically to Go is one of those chestnuts of conventional wisdom that never receives any kind of backing in actual data. Well, from TFA: "Again, they’re not many, but they are quite vocal (including whole startup dev teams blogging about switching their codebase), and enough to create a certain buzz (and to surprise Rob Pike, who initially expected people to come to Go from C/C++)". Data are always hazy in our industry -- who knows what each company/developer uses? But we can gauge interest from the discussion around something. So: 1) Go had several known startups (and established companies) post that they migrated some of their services to it from Python. 2) We have Rob Pike, who wrote a couple of years go he was surprised seeing most in the Go community come from Python, whereas he expected them to come from C/C++. Now, I don't know what you mean "If you think that Python and Go are made for the same tasks then you're really confused". What's confusing? Sure, Python has some unique niches (like scientific computing), but there's a lot of stuff people use Python that they could (and are) use Go for. I'm sure you've heard of Twisted. Go solves a similar problem quite nicely. Also: RESTful services. But even more so, people also use Go for glue stuff, including for stuff previously relegated to a scripting language. It's not that huge numbers are leaving Python for Go. Perhaps not even 1%. But it's a vocal 1%, and it might also be an influential 1%. Heck, at some point Perl was king of the hill for scripting and web application development. But then 1% went to Python, and 1% went to Ruby. And then they continued going...
- keypusher 12y agoHere's one particular example of a real company moving a production application from Python to Go: https://www.spacemonkey.com/blog/posts/go-space-monkey https://www.spacemonkey.com/blog/posts/go-space-monkey
- wtbob 12y agoOur team is traditionally a Python team; it's a good fit for the kind of nimble projects we need to take on. We've spent the last few months writing some of our tools in Go. For our purposes, it is slightly slower to develop in, but we have much more faith in its correctness, and deploying the code is a dream. Also, it's much faster than what we've been useful. We'll still be doing some Python development, but were it up to me I'd be using Go for everything I ever used Python for.