This article is from the public number:InfoQ(ID:infoqchina), the title map is from : Vision China.

October 30, Guido, the father of Python, announced his retirement and left Dropbox.

HeThe tweet said, “This thing feels both bitter and sweet: bitterly, I am leaving Dropbox right away, and I am now retired. Sweetly, during the time I worked as an engineer at Dropbox, I learned a lot, like type annotations come from this. Experience. I will miss the days of working here.”

Python is consuming the world

Today, people’s enthusiasm for Python has gone far beyond the original developer community. Some predict that as the Python user base grows rapidly, it will soon become the world’s most popular programming language. Millions of people use Python every day, and the user base is exponentially growing, with few signs of decline.

Whether they are professional or amateur developers, they are using Python to handle large and small tasks, especially Web developers, data scientists, and system administrators. The first black hole images that appeared this year were stitched out in Python.

Python plays a key role in some of the world’s best-known organizations. For example, Netflix uses Python to deliver streaming video to more than 100 million homes worldwide, Instagram uses Python for image sharing, and NASA uses Python to explore space.

The early years of Python

Python was originally a personal project of Dutch programmer Guido van Rossum. In the late 1980s, van Rossum developed a distributed system at the CWI department of the National Center for Mathematics and Computer Science in the Netherlands. Disappointed with the existing programming language, he decided to develop a new language – one that is both easy to use and powerful.Language.

Father of Python Guido van Rossum

For van Rossum at the time, it was difficult to do anything with only a few programming languages. The Amoeba distributed computing system he is developing requires him to use C or Unix shells, but both languages ​​have significant limitations. The C language requires developers to manage memory manually, easily laying down potential bugs, and lacking a reusable code base. Developers who want to complete their daily tasks need to reinvent the wheel in every new project. Another problem with the Unix shell is that although it provides utilities for everyday tasks, they are too slow to handle complex logic.

The limitations these developers impose on developers are so great that in van Rossum’s view, the interpretive language he created himself, borrowing some features from the ABC language, seems to be the best choice.

van Rossum recalls: “I was thinking, why not develop a language myself? I can learn from ABC’s ideas and narrow down the project to something that would have taken three years to complete. Shortened to three months and turned it into my own personal project. So Python was born.”

At the end of 1989, van Rossum began to develop the language seriously, borrowing the name of his favorite comedy group “Monty Python”, and because of the relationship with the snake, then there was the logo of the coiled giant python. .

He said: “At the time, I didn’t know if Python would really make my work more efficient. In a way, I really like the idea of ​​doing a big project myself, and Can be designed and implemented the way I want. On meIt seems that programming is an interesting thing.”

Three months later, van Rossum made a working Python prototype.

He said: “Although Python now has a lot of abstract features that didn’t exist at the time, the language itself remains the same.”

“At the time, Python already had the parser and the basic components needed to run the language. The first runnable Python program can still be run now.” Their function definitions are the same, the indentation is the same, the dictionary and tuple creation syntax is the same, and the interactive prompt is the same.

When his two colleagues started using the language to handle everyday tasks, van Rossum didn’t expect it to be popular. Because he knows how difficult it is to make a programming language popular before the advent of the Internet era.

Today, a piece of software can be shared to the world with just a few mouse clicks, but in the 1980s it was a very laborious task.

In 1991, van Rossum released Python to the world through the alt.sources newsgroup. This was basically an open source license agreement at the time, which appeared six years earlier than the term “open source license agreement.” Although the Python interpreter at the time still needed to connect 21 separate parts into a single compressed file and needed to be downloaded from the Usenet network overnight, it was still much more efficient than the way tape was sent offline a few years ago.

He said: “I hope that Python can be successful, after all, what I did before basically failed.”

van Rossum said that after a long time, he realized that the user base of Python is growing. Gradually, he realized that the development of Python was taking shape. After a period of communication with the Python community, he knew that Python was successful.

Why does Python win?

Python began to receive attention in the early to mid-1990s, and the era of Python came, which shocked van Rossum.

van Rossum believes that developers who have been attracted to Python have turned to Python for the same reasons that he originally created Python. They need an advanced scripting language that balances ease of use and functionality. They want to be able to end the days of manually managing memory in C and re-implementing code for repetitive tasks when starting a new project.

Warsaw says that Python strikes a balance between usability and functionality—in the early 1990s, no mainstream programming language offered this balance. “I wrote a lot of Perl, Tcl, and C code, and they didn’t feel that they were fun at all. When Python appeared, I thought, ‘Wow, it makes programming more interesting.”

Whether past or present, Python provides clear and unambiguous syntax that uses indentation to group code into blocks, making it easier for developers to read and understand code.

In 1994, Barry Warsaw at the first Python workshop

Python emphasizes the simplicity and readability of code, which is no accident. Van Rossum has publicly stated that programming languages ​​not only tell the computer what to do, but also facilitate the transfer of ideas between developers.

Ryan said that in addition to readability, Python has built in some common features early on, which makes Python stand out from other languages. “You can use certain features from the beginning, such as classes and exception handling. Python also provides support for functions like lambda, map, and filter, which are useful in many situations.”

If the mainstream programming language of the late 1980s is a little better, perhaps it won’t give Python a chance. Van Rossum developmentOne of the motivations for Python is because Perl is not compatible with the Amoeba distributed computing system he uses while working at CWI. He said: “The lucky thing about Python is that Perl can’t be ported to Amoeba. If Perl can be ported to Amoeba, I won’t want to develop a language myself.”

Although Python attracted a lot of hardcore fans after its release, Python was still at a disadvantage in programming languages ​​in the 1990s. According to van Rossum, Python’s competitors are Tcl/Tk and Perl, and the two languages ​​have the same goals as Python, which is easy to use and powerful.

He said: “In the 1990s, Perl was undoubtedly the number one in the top three programming languages, Tcl/Tk was second, and Python was third.”

The Stack Overflow developer report shows that Python is the fastest growing programming language in terms of developer activity, and Perl is shrinking, and it has not even appeared in the latest Stack Overflow developer reports.

The image below shows this explosive growth. In recent years, Python-related issues on the Stack Overflow website have grown much faster than other programming languages.

So how does Python surpass the rivals of the past? How do you explain the very different fate between the two languages? According to van Rossum, this is related to how easy it is to maintain the code base after reaching a certain size. He said, “From the experience of people, Perl is suitable for writing scripts with a small number of lines, but if your main code exceeds 500 lines, there are thousands of lines of branch code, then in Perl. There are many principles to follow to maintain this code. In Python, you don’t need to follow that.Growth. By the late 1990s, Python attracted a large number of users from all over the world. In the meantime, with the formation of the predecessor of the Python Software Foundation (PSF, officially established in 2001), the management of the Python language began to standardize. . As the community evolved, the biennial Python workshop evolved into a larger annual event that eventually evolved into PSF’s annual PyCon, which is still popular today.

In the 21st century, the Python user base grew stronger, and early Python users were concerned about the impact of van Rossum’s accidents on Python.

In any case, van Rossum continues to play a central role in Python. He is the core of Python, and this idea has never disappeared. Some people call him Python “a benevolent lifelong dictator” (BDFL). This half-joking title has been circulating for many years.

van Rossum said: “For a long time, I have withstood the pressure and developed project management skills. I delegated many things to others and let them do things according to their own ideas.”

In fact, van Rossum’s established Python open nature (discussed openly among community core developers) is a decisive factor in Python’s success.

The evolution of Python

In the meantime, Python has evolved dramatically. In 2008, Python 3.0 was released, making Python a modern programming language. Recently, the way Python has been managed has changed dramatically.

These changes occurred last year when van Rossum removed the title of BDFL because of differences in the assignment expressions introduced in PEP572.

Although the introduction of assignment expressions is for more efficient editingWriting code, but van Rossum was severely criticized by opponents on the Internet, and some believe that this proposal will reduce the readability and maintainability of the code.

van Rossum said that although he was used to the debate about new features, this time someone slandered him, their attitude was very tough, and even someone personally attacked him, so he decided to resign.

He said: “Those who are technically dissidents are beginning to complain on social media that I have broken Python’s decision-making process, or that I made a serious mistake. I am very disappointed, I feel that I have come from The attack behind.”

“In the past, when deciding whether to make changes or improvements to Python, a group of core developers will discuss the pros and cons of this. They will come to a clear consensus, and if the results are not clear, I will be in my head. Repeatedly consider and then make a decision. In the proposal of PEP572, although it is controversial, I chose “Yes, I want to do this”, but people do not buy it.

“This is not a rebellion, but I don’t think I have enough trust in the core developer community.”

He believes that the way Python’s controversy has changed is partly because there are too many people using Python.

“The Python community is getting bigger and bigger, and that’s probably one of the reasons. Of course, it’s difficult to reach any form of consensus, because no matter what decision you make, there will always be some disagreements. people”.

Python Core Developer Mariatta Wijaya

Earlier this year, the core developer responsible for maintaining the CPython interpreter set up a steering committee to oversee the future of Python. Members include van RossUm, Warsaw, and other core developers Brett Cannon, Carol Willing, and Nick Coghlan.

Warsaw said that when the user base of a programming language grows at such a rapid rate, it is necessary to use this approach to manage language development.

He said, “I think van Rossum really put everything on his shoulders.”

“25 ​​years ago, when Python was still a niche programming language, the community was much smaller, and van Rossum might be able to lick himself, but even then, he had a lot of work. I think it would be better to share these burdens with five people, considering his personal health and community involvement.”

Warsaw said that after each release of a new version of Python, a Steering Committee election will be conducted to prepare for the next generation of Python language core leadership.

He said: “If Python can stay evergreen after 25 years, then it should not be van Rossum and I am in charge.”

The establishment of the Steering Committee has also been welcomed by the Python core developer community. Core developer Mariatta Wijaya said the move felt like a step in the right direction. She said: “For me, the steering committee is much better than letting one decide everything. It’s a huge responsibility and burden. It’s a good sign, it means the community will have more input.” .

The future of Python

Although Python continues to attract new users at an alarming rate, some in the community see the challenges ahead. If Python wants to stay evergreen, it will evolve.

At this year’s Python Language Summit, BeeWare co-founder Russell Keith-Magee said that if support for mobile and Web platforms is not improved, Python will face a “survival crisis.”

He said: “The penetration of mobile phones and tablets into the market has never been achieved by desktops and laptops, but the entire community has no one on how to design them.Um is optimistic that “the evolution of community-driven Python” will continue to achieve “unparalleled success.”

He said, “A community with a solid core developer now has a new management system, and I think we are better prepared for the evolution of the Python language.”

Warsaw says that if anyone wonders if the Python community has the ability to continue to find new scenarios for Python, let them look at the first black hole image captured in Python.

“There are always a few people in the Python community, and I see them as crazy Python scientists. They always think, can make it like this today, can you go further tomorrow?” p>

This article is from the public number: InfoQ(ID:infoqchina).