An analysis of the reasons why Python3 can revive Python _python

Source: Internet
Author: User

I read about "Python 3 is destroying Python" from Stephen Goss. There are a lot of great arguments in this article, but I don't think Python 3 is destroying python or that the whole situation is bad for Python.

But as the more tacky adage says, perhaps every crisis also means an opportunity.

Maybe Python 3 can revive Python.

Obviously, the trouble is not just the Python 2 to Python 3 transplant. The time is no longer 2005 years, and young programmers are no longer so excited about which version of Python. Yes, there are a lot of Python jobs on the market, but at the same time there are more Java jobs. And there are a lot of Perl jobs in the market--it's said to be a bad time. My point is not to say the number of posts or the number of warehouses above GitHub, my focus is on thought and passion. I know this is a bit subjective, but I feel that Python has recently been missing on both fronts.

For example, we see people moving from Python to go.

Although not much, the phenomenon is noteworthy (including the entire new development team blogging claiming to be porting their code base), and enough to generate some public opinion (and also to surprise Rob Pike, who initially wanted people to move from C + + to go).

The challenge for Python comes from the west. Some challenges erode Python's share in one area (for example, new and different steps will prefer node or go rather than twisted,rails still dominate the web framework), direct competition for a particular professional (for example, Julia in Scientific computing), and the general competition (Clojure,groovy,javascript,dart, etc.).

So here's my idea for Python 3, a very simple idea:

Let Python become Tempting

Python 3 is already incompatible with Python 2, and people are not flocking to Python 3, so adding some incompatible changes is not only bad, it's better for the language.

To be honest, if Python 3 has enough attractive new features, more people will be willing to migrate to Python 3 (at least their new project), and more and more people will be porting their Python 2 libraries and projects. Even more, in my humble opinion, this will attract more people who are not using Python now.

As you've seen, Python 3 is a tedious update.

True, Python 3 makes Python clearer, and fixes some long-standing problems and headaches. But it has not changed that much. In other words, the idea of Python 3 was set loosely when it was conceived. JavaScript was not that popular at the time. YouTube has not yet been born. That was a long time ago.

These days, like the right envelope, immutability, good asynchrony, and so on, are the focus of sharp hackers.

With a few words, here are some suggestions that might make Python 3 interesting. At least for me it would have intrigued me:

    1. Removes the global interpreter lock (Gil,global interpreter lock). or provide a good asynchronous processing mechanism. Guido's pep 3156 won't be able to solve the problem. It's also good to have a primitive that resembles a go channel (channels).
    2. Make Python faster. If JavaScript can get faster, CPython can also become very fast. Or pypy can be mature enough to replace cpython (there should be only one existence right). If you need a big coffee like Lars Bak, go kickstarter--I'll pay for it. Let the big company also be embarrassed to also contribute a little. Not that Dropbox also spend money to develop their LLVM based on Python?
    3. Increase the type. Well, it's the opt-in type. This way you can use it to speed up your code (for CPython), or make sure it helps type checking (for dart). Add type annotations to the standard library.
    4. Improve the standard library. Find a team to go through these standard libraries, fix persistent annoying problems, improve speed, and fix bugs. Improve the APIs for these libraries and provide a simpler interface for common things (compare requests and urllib) with the existing standard libraries to provide a new, improved standard library with a different name domain. Also, make their transformations easy to do (perhaps through some automated tool).
    5. Improved read-evaluate-output loops (Repl,read-eval-print loop). Come on, it's been 2014 years now. Use modern methods to do REPL again. Add color or something. Reference under the Ipython good. Make it a client/server thing so the IDE and the editor can embed it.

So say Python 3 developers, take it slow. Yes, but not too slow. It's about 3 or 4 years. We wait for ES6 10 years, 3, 4 years we can still wait.

It doesn't look like everyone is using Python 3, so take a little risk. Break. Publish it earlier and more frequently. Deal with the community more.

You guys, Python 3 doesn't actually kill Python. But it may be able to save it from what is killing it.

PostScript: What do you think? Can you think of more ideas that make Python 3 more appealing? What new features can inspire your interest?

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.