Why is Python getting increasingly popular now?

Source: Internet
Author: User
Why is it so hot now? Why didn't I replace php or ruby in the past? The language is not popular, mainly because of market demands. It is related to whether the language is good or not, and there is no cause for such problems as Python, we started to use it before year 78. At that time, we found that the programming language could be so elegant (C ++ was used all the time ). In recent years, the public felt that Python itself had not "suddenly" added anything more fascinating. For me, Python became popular when I started ipython for the first time many years ago. The language is not popular, mainly because of market demands. It is related to whether the language is good or not and has no cause or effect.

For example, in Python, we started to use it before year 78. At that time, it was like a programmer, and we found that the programming language could be so elegant (originally C ++ ). In recent years, the public felt that Python itself had not "suddenly" added anything more fascinating.

For me, Python was very popular when I started ipython for the first time many years ago. It is not good at the same time, but the top one can be pulled up. Now we can easily see the code written by the "python programmer:

sum = 0for i in range(len(num_list)):  sum += num_list[i]

I see the sorrow that douban becomes an attack website.

Ideally, Python and C ++ are very similar, and they all want to be made of gold.

C ++ is academic, and everyone points to it as a secret. Design Philosophy is "everything you want". First, it must be compatible with C, second, we need to have other languages, and we need to have other languages. However, on the one hand, the C language itself is not very complete (such as header files), on the other hand, to make the new functions dirty and tired for the sake of smoothness during runtime, all are thrown to preprocessing and compilation, this makes C ++ obscure and difficult. Writing code in C ++ is a bit like writing documents in Classical Chinese, which is full of code and literary talents. It requires a lot of effort outside of the content. Reading classical Chinese documents (C ++ Code) is even more painful. First, you must be familiar with various anti-human syntaxes (value transfer/address transfer/move semantics, preprocessing, function pointer ......), Familiar with historical allusions (strong tive C ++ ,......)

Python has different ideas. The core of Python is concise, straightforward, and clear. Python thinks that there is only one best way, and it only presents the best side. The Python syntax itself is a best practice of pseudocode, and this "pseudo code" can still be run. This makes Python easy to use and extremely high programming efficiency. You only need to say something about Python development. In the years when ruby on rails was the most popular, some people asked guido's uncle (author of Python) how to think about it. guido said that Python does not need killer applications, because if so, the role of Python in other aspects is ignored.

Back to the topic itself, why is Python getting increasingly popular?

The biggest problem with python is performance. Performance problems are the most likely to be misunderstood during design. C ++ has been rampant for many years with "performance close to C language. With the significant improvement in physical hardware performance and the significant improvement in software complexity, people began to have a more correct view of performance.

First, sometimes performance is not important. I/O-intensive businesses are waiting for IO most of the time, saving less than 1 ms to increase the development volume several times does not seem to be very good.

Second, sometimes programmers are more efficient than machines. For many complex logic features, the use of clearer languages reduces the burden on programs than obscure languages, greatly enhancing the quality of software. (Especially when the company is not able to offer the right treatment to anyone who knows about it)

As a result, Python/Ruby/Java began to rise. With the "inside battery" of Python, you can achieve things that were not so good in the past that had to be made repeatedly and work overtime every day. When I was reading the Python source code, I suddenly felt that the underlying Python source code can be understood as a library of some common functions of the C language (such as the dict implemented by hashmap ), the Python process loads these libraries and then reads the configuration file (Python code) to execute the corresponding logic. With the same function, Python will certainly be slower to escape once than directly using C, but you may not be able to write the C code that runs faster than Python. (Of course, zhihu's Daniel is still excluded)

As a result, languages like Python have liberated the programmer's time. programmers can have more output on a lonely and difficult night. One project is created one by one, and the Community is established, the sluggish market also began to be notified.

Even so, Python is still a hit: I can be less slow. Python can be easily integrated with C code. The combination of Python and C completely solves the problem: quickly develop and build a product prototype using Python, and then find out the performance bottleneck with targeted performance optimization. What's wrong with using steel to save time, save costs, reduce risks, and improve the quality of life for programmers?

Let's talk about it in general.

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.