Is python 3 destroying Python?

Source: Internet
Author: User
... One of the most important advantages of Python 2 is that it has a large number of third-party libraries that can be used to do anything, but Python 3 doesn't have that advantage. Admittedly, there are a lot of libraries that have been ported to Python 3, but there are more libraries that are not ported or easy to migrate. For example, you need to parse X, but X is not as easy to parse as YAML and JSON. Most likely there is a third-party parser to choose from, but only Python 2 is available, not the ported version for Python 3. In addition, there is a functional difference between the byte string (str) in Python 2 and the Byte string (bytes) in Python 3, making this more difficult to port. In fact, porting it is difficult and requires a lot of small tricks (trick) to be compatible with Python 2 and Python 3. So, you have two options, either using Python 2 (a language that is not already recommended) to develop your program quickly, but it will take you more than 10 times times to migrate the relevant libraries (and all dependencies). Or, use another programming language that also has a lot of libraries, but no more problems with Python 2/3. The second option is obviously unpopular, because if we do, we already have a lot of Python 3 programs in our production environment and most of the Python 2 libraries need to be ported. Regardless of whether these conditions exist, people will either continue to use the Python 2 development program, or choose another language that does not hit their own face ...
Article Link: Python 3 is destroying python

Reply content:

Thank you for your invitation. Let's summarize the idea of this article
    1. The advantage of Python 2.x is that it has a large number of third-party libraries, although many libraries have been ported to Python 3.x, but there are many that are not ported, and many libraries are difficult to transplant.
    2. Existing Python 2.x projects can be ported seamlessly to a new version of Python 2.x, and porting to Python 3.x will be more difficult and cost more resources.
    3. Most popular and supported libraries that are compatible with Python 2 and Python3 are written by a subset of languages (subset) running on their respective platforms.
    4. The best way is to fork 2.7 to make 2.8, but the official does not support this practice.
The author makes a lot of sense, but I don't think Python 3.x will destroy Python and make the Python community better.
    1. third-party libraries now more and more libraries have turned to compatible Python 3.x, see list on PyPI https:// Pypi.python.org/pypi? :action=browse&c=533&show=all . Some libraries use the so-called subset of languages to implement Python 2 & 3, or use the six module to help address compatibility issues across Py2 and Py3, which can affect efficiency, but for the entire program, It is believed that the performance gains from the algorithm optimization of the core modules will be much greater than these losses. And there's 2to3.py this script can help convert the build Py3 only script to be released, fully automated.
    2. If it is an existing project, I believe many of them also deal with the phase of the PY 2.4-2.6, I believe that even the PY 2.7 will not, let alone the updated library. These old code, I believe that some of the upgrade version of the library is not necessarily able to support the <=py2.5. The old service let it continue to run, there is no need to have to move the knife. If you really want to upgrade, in any case will cause refactoring, it is to choose a little modification, reuse most of the Python compatible code, porting to Python 3, or directly to a language, from the beginning, is the director to think of the problem.
    3. Python 3 It is a good thing to separate the behavior of bytes and STR, and finally fix the mistake left by a history, and some people say bad?
    4. Python 3 Each upgrade will bring a new stdlib, fix some errors, and may add new syntax. such as Python 3.4.x inside the new Asyncio library, love!
The old project, stays in Python 2. If you are opening a new project, why isn't choose Python 3? The next generation of PY programmers may prefer to use py3, and the various teaching aids will slowly turn to py3. Py2 to 3 is progress, and C has barely changed for decades. Backwards compatibility may become an impediment to development and look at windows. Python remains the mainstream language, and as Py2 stagnates, PY3 will inevitably slowly replace Py2, adding new features and repairing previous design errors to make them a better tool. Not because you are accustomed to 2, do not want to accept new things on the exclusion of 3, no good, like WinXP and Win7, a lot of new hardware and software is no longer support XP if Python3 changed its name python++ may not be controversial ... No, Python3 will only destroy Python2, because this is the meaning that it appears Python3 developed for 6 years, no achievements. Python3 is not revolutionary and backward-compatible.
It's going to go down like this, Python is really doomed.

The inverse view of PHP has been booming over the years, namespaces, package management, hhvm,phpng, and asynchronous parallel swoole. Once Python said that it was the next PHP. The result ...

Other languages, such as golang,node.js, are gradually getting hot. Python is still that tepid. Can say Python3 These 6 years really is fatal error. 1 C + + is a completely different language from C, but it is backwards compatible with C
2 See Python3 There is no reason incompatible with Python2 's syntax. So the only thing that can be explained is that Python officials want to lead the community like a dictator, "to die against me." Then the response of the community is "dictator to die".
3 Python3 for the Python2 of the language characteristics of the advantages, is not enough to impress the Python2 community.
4 Since Python is open source, and the copyright limit is weaker than the GPL, once Python officially stops supporting 2.x, there will be a self-sustaining version of the community, no worse than the official.
5 since offending the community, then the response will be a lot of developers to boycott Python3, will not be able to upgrade their development of the library to 3 novice learning, which version of it? Because I've been mixed up in C + + for so many years so I'm hanging, so you should listen to me:
The advantage of Python is that many libraries, I can quickly copy other people's library, so that the instant development.
However Python3 is incompatible with the library I use.
What, you say transplant? That dirty work dirty how can let me so have experience, so noble elegant person to do!!!
I suggest you quickly fork out a version I can continue to use, the best not to change, so that I can do nothing to change my code, but also can claim that I am using the latest version, to the casual
Nobody else's advice is worth mentioning, and if you don't listen to me, you'll die like the Perl community.
--a summary of the author's Spirit Python 3 's original sin lies in the break of the back compatibility, and has not succeeded in convincing developers why they need to migrate to Python 3.

But to say that Python 3 will kill Python, I think it's an exaggeration, Python's ecosystem is there, it may be in some ways more than other languages and technologies, but overall the status is still solid, after all, in most scenarios, its performance is not a big problem.

But the negative effects always exist. Python 2.x in 3.x this stalemate state, in the community caused a great disagreement. The longer this disagreement drags on, the worse it will be for Python's future development. Why is it? Because other competitors are rapidly evolving. For example, in the most important areas of web development, node. js and go are attracting more and more attention. In particular, go,syntax and Python are not very different, out-of-box performance is higher than an order of magnitude. This has prompted a lot of developers, especially those who are willing to try new technologies and are widely disseminated (so-called evangelist), in the face of 2to3 this choice, simply replace the entire technology stack to go.

Personally, why not want to migrate to Python 3? Bottom line: Python 2 just works. Python 3 lacks a feature upgrade that makes people want to be eager.
  • 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.