Foreign developers talk about how to abandon PHP and switch to Python

Source: Internet
Author: User

With the help of this article, the author has not so much explained why he made this choice, rather than comparing the performance of PHP and python. The author's original translation is as follows:

The first reason I gave up PHP is the language. PHP is actually not a language, but a huge plug-in structure that shows low-level libraries in a high-level form. Most developers use the C function (curl, MySQL, Gd, etc.) Packaging language. In general, their libraries are very simple to display. As a result, PHP APIs are inconsistent.

The second problem with PHP is language management. The PHP language is actually designed by the committee, and no one has come up with any consensus standards. PEAR has its own standards and PHP has its own standards, which makes SPL classes more java-style, but pear is quite different.

Over the past 11 years of development in PHP, I have known many expert developers in the PHP field. They also have many opinions on PHP. In addition to the Committee issues and standard confusions mentioned above, due to the wide range of use of PHP, backward incompatibilityCodeIt causes great damage.

It is also mentioned that PHP lacks many features of modern languages. Now let's talk about Python:

The creation method of python is almost the opposite of that of PHP. First, python is led by benevolent dictator and Guido van rosum. The language development is led by a single person. Therefore, its development, management, and long-term operations will maintain good continuity. Core developers of Guido and Python use pep to create standards and use public interfaces to demonstrate how standards are created. In addition, Guido does not appear in the language layer if the expected language features are not good enough (for example, there is no ++ operator and there is no allocation in the comparison operator ).

The continuity feature extends to the entire PythonCommunitySo it is hard to find that python is completely different in different projects.

One feature of my favorite python is its clarity. When opening a file in Python, I will clearly know what the code looks like, and think that I have been overwhelmed by PHP many times, I think this feature is very useful.

In short, Python has very good system-level features.

Another great feature of python is straightforward. Need namespace (namespace )? The file name is The namespace. Do you need a module? You only need to replace it with a _ init _. py file. Do you need to rename the function? Only new_func = old_func is required.

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.