Python 3 can revive Python
I read this post by a certain Stephen A. Goss about how “Python3 is killing Python”.
It has some compelling arguments, and while I don’t necessarily agree that Python 3 is indeed killing Python, the whole situation doesn’t do Python much good either.
But maybe every crisis is an opportunity, as the cheesy motto says.
Maybe Python 3 can help revive Python.
You see, it’s not just the Python 2 to Python 3 migration that’s troubling. We’re not in 2005 anymore, and newer programmers are not that impressed with either version of Python. Sure, there are lots of Python jobs, but then again, there are even more Java jobs. And once upon a time there were many Perl jobs — I hear they’re not doing that well nowadays. I’m not talking about job count or GitHub repos. I’m talking about mindshare and enthusiasm, and I know that these are a little subjective, but I feel like Python has been lacking in these two regards as of late.
For example we see people going from Python to Go.
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++).
So here’s my idea about Python 3. It’s a simple idea:
Make it compelling.
It’s already incompatible with Python 2. And it’s not like people are migrating to it in droves, so adding a few more incompatible changes might not only not hurt, but even benefit the language.
Seriously — if Python 3 had enough enticing new features, more people would migrate to it (at least for new projects), and more people would be inclined to port their Python 2 libs/projects. And, methinks, it would also attract more people that aren’t currently using Python.
You see, Python 3 was a ho-hum update.
Nowadays stuff like proper closures, immutability, a good async story, etc, is considered a necessity by discerning hackers.
Without further TL;DR; here are a few things that might make Python 3 an interesting proposition for today’s hacker types. I, for one, know they would rekindle MY interest:
- Remove the GIL. Or provide a compelling async story. Guido’s PEP 3156 might, or might not be that. Some primitives like Go’s channels would be nice to have.
- Add types. Well, opt-in types. That you can use to speed some code up (a la Cython), or to provide assurances and help type-check (a la Dart). Add type annotations to everything in the standard library.
- Shake the standard libraries. Get a team together to go through them and fix long standing annoyances, improve speed and fix bugs. Improve their API, and offer nice simpler interfaces for common stuff (think requests vs urllib) Offer the new improved library alongside the current standard library in a different namespace. Make it easy to switch over (perhaps with some automated tool).
- Revamp the REPL. It’s 2014 already. Redo the REPL in a modern way. Add some color. Take notes from IPython. Make it a client/server thing, so IDEs and editors can embed it.
So, Python 3 dev people, take your time. Well, not too much time. Perhaps, 3-4 years. We’ve waited 10 years for ES6, we can wait half of that for you.
It’s not like anyone is using Python 3 anyway, so take some chances. Break things. Release early and often. Engage the community.
You see, Python 3 is not really killing Python. But it might have a chance to save it from what’s actually killing it.
P.S. What do you think? Can you think of additional stuff that could make Python 3 more enticing? What new feature would tickle your fancy?