Ask HN: Could Python be reborn in the image of Go?
I've been noticing the increase in projects using Go seemingly to replace other existing projects written in Python. Go seems to have a strong following now due to a couple of useful features, but it's still a new language, whereas Python is an established language that many people enjoy writing code in. The question is, could Python be updated to include the kinds of core features that make Go attractive, while still retaining its Pythonisms?
Go's strengths seem to be in its static types, concurrency features, static analysis tools, lack of generics, and compiled binaries. I could be wrong, but it seems like all of these (save maybe the improved concurrency) could be added to Python and be a strong competitor to Go. Most of the language could remain the same, but it could then be adopted in places that Go is gaining a foothold. The main purpose would be to increase the utility of the existing body of knowledge around Python, and increase its usefulness.
Am I crazy?
6 comments
[ 2.7 ms ] story [ 28.3 ms ] threadone of the things i like about go - ease of deployment - is more irritating with python. but: once you have set up a pipeline for deploying your python code, then you're good. it's not really like the python language needs to be reengineered to compile into a single statically linked binary to make it possible to ship. these days there are containers and so forth, and historically a number of bundling and packaging tools for python apps have been available.
i would still pick python over go any day for prototyping algorithmic or numeric code -- it is a terser and more expressive language for computing things, and python's dynamic typing + duck typing lets you write syntactically generic code.
Go is fast, because it is statically typed and compiled. But this requires a good understanding of programming or your program will simply not run. Learning Go as a first language is hard.
Python is slow, because it is dynamically typed and interpreted. This makes Python easier and more forgiving to beginners. Learning Python as a first language is much easier.
One is Meccano, the other is Duplo.
What you've said doesn't make sense as they have different aims and target markets as languages.
What happened with Python is the it got adopted by academics, amateur programmers, who a decade or two ago needed an easy language as they first started experimenting using programming in their fields. So Python ended up with a huge number of specialist libraries.
Now they are experienced, a lot of academics want a fast one and Go fits that niche better than C/C++ (hard, easy to make very bad mistakes) or Java/C# (complicated, need compilation and deployment).