Python3 is destroying the cause of Python _python

Source: Internet
Author: User
Tags in python

Python 3 effortlessly becomes the worst thing that has happened in the Python community. I remember the first time I used Python, I was spending a lot of time on C + +, and Python was like an opening for me. Instead of using a few hours or days, I can open a text editor to write a working program in seconds or minutes. I remember when Python 2.5 came out, it brought a whole bunch of new, neat language features. I love python, but I admit it has a weakness, but it doesn't matter, all programming languages have it. It's a powerful place to make it interesting. Python 3 has some small incremental improvements compared to Python 2, but at the same time it loses a lot of Python 2 powerful things.

One of the powerful parts of Python 2 is the huge Third-party library behind it, and, uh, can do anything. Python 3 does not have this. Yes, a lot of the libraries have been ported, but there are still 10 times times as many libraries that have not been ported, and it's not easy. For example, you need to parse the x format, and x parsing is not simple, it's not a common format like YAML or JSON. It is quite possible that the X parser has been written in Python 2, but has not yet been ported to Python 3. Also, given the fundamental difference between Python 2 's byte string (str) and Python 3 's byte string (bytes), porting will not be so easy. In fact it can be difficult to transplant and requires a bit of porting skills, like the compatibility of Python 2 and Python 3. So, you have some options, you can write your app quickly with Python 2 (a deprecated language), importing some libraries (and all their dependencies) can be as long as 10 times, or you can use a different programming language, it also has a lot of third-party libraries, but it doesn't face the Python 2/3 problem. The second option is obviously not very popular because otherwise we have a lot of app products written in Python 3, and then a large library of Python 2 will be ported. (Translator Note: This logic seems to be a problem?) Neither of these has happened. People either continue to write software in Python 2 or choose another language that does not have their own face.

Another powerful thing about Python 2 is that programs written with it can almost always run on the next version of Python without much modification. If your company is operating on software written in Python 2 (as many companies do), porting to Python 3 will cost a lot of money because your requirements files can be very large and full of libraries that have not yet migrated to Python 3. No sensible business justification would have cost hundreds or even millions of dollars worth of development time to migrate to Python 3. If it's cheaper than that, you might ask So-and-so to transplant their entire code base to Ruby. Now if you have to rewrite your software, would you choose Python 3? No.

Almost all of the more popular libraries that support Python 2 and 3 use only a subset of that language, which can be run on two platforms. SQLAlchemy, one of my favorite Python libraries, is doing a good job of it. So is Django, but not so well done. The language subset, which I would call Python X, is boring to use, requires some kinky tricks, and is usually not as powerful as Python 2 or Python 3. Is it interesting to migrate Python 2 libraries to Python x? Sadly, there's nothing to it, because it's the fun that makes Python great.

Python 2, sadly, has been discarded. Python 3 is so decadent that no one uses it. Python 3 has little change. Did not bring much benefit, but the lack of lost a lot. Over the past few months, I've built some projects and services with Python 3. I am not defeated by it. It's like writing software with Python 2, except for a few libraries. There's nothing to be surprised about here. The python community should have moved to Python 3 in the past few years, but it turned out to be more and more obvious that people were moving to new languages (or to the old language they discovered again). Some of these languages also have good features, such as powerful input systems, pattern matching, better performance, better multithreading and concurrency, simpler external function interfaces (FFI), prettier lambda statements, and more.

One scenario is to fork Python 2.7, and then continue to develop the language, adding some features that are as backward compatible as possible, so that Python 2 applications that cannot be ported (due to some financial constraints) can continue to evolve and improve, And then bring value to the companies or individuals who have invested so much time in developing them. That's the right thing to do (in fact, it would be best if Guido and the other dominant people in the Python community could do it officially, rather than force everyone to fork it.) The features in Python 3 can be ported back to Python 2, and then the Python 2.8 is released. Those who have taken the time to write new software with pure Python 3 can use tools such as 3to2 to become compatible with Python 2.8. Python 3 can then quietly leave for Python library maintainers to replace Python x with Python 2.

There are other options, but saving Python 2 is obviously the right thing to do, so it's not worth mentioning. The rescue of Python 2 will not come from the crown, because the people responsible for this sort of thing show a great deal of contempt for Python 2 users. If people in the community don't unite to save Python 2,python 3 years later will become the standard of Python, and then many libraries will be ported (although many certainly not), then a lot of input will be in vain. The community will shrink a lot at that time and lose the light of the past. Refer to Perl. People will forget it.

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.