Development History of the Programming Language Python

Source: Internet
Author: User

Development History of the Programming Language Python

Python is a simple, elegant, and easy-to-use language. Two days ago, I was excited about the benefits of Python to my friends.

"Okay, I admit that Python is good, but why is it called Python ?"

"Well, it seems like the name of a TV series ."

"Are you talking about Guido as an American ?"

"He switched from Google to Dropbox, but his name is Dutch ."

"Are you sure you are familiar with Python ?"

So for shame, I spent time investigating the history of Python. I have seen the sources of many functions in Python and the design concepts of Python, the evolution history of a programming language, and the wonderful connection between Python and the open source movement. From the history of Python, we can look at the concepts and achievements of open-source development.

This can also be used as an example of my Python quick tutorial.

Origin

The author of Python, Guido von rosum, is indeed a Dutch. In 1982, Guido received a master's degree in mathematics and computer science from the University of Amsterdam. However, although he is a mathematician, he enjoys the pleasure of computer. In his words, despite his mathematics and computer dual-material qualifications, he tends to do computer-related work and is keen to do any programming-related work.

At that time, Guido came into contact with and used languages such as Pascal, C, and Fortran. The basic design principle of these languages is to make machines run faster. In 1980s, although IBM and Apple had set off a wave of PCs, their configurations were low. For example, for the early Macintosh, only 8 MHz CPU clock speed and kB RAM, a large array can occupy full memory. The core of all compilers is optimization to enable the program to run. To improve efficiency, the language also forces programmers to think like computers in order to write programs that better suit machine tastes. In that era, programmers were reluctant to extract every inch of computer power from their hands. Some people even think that pointers in C language are a waste of memory. For dynamic types, automatic memory management, object-oriented ...... Don't think about it. It will paralyze your computer.

This programming method upset Guido. Guido knows how to write a function in C language, but the entire writing process takes a lot of time, even if he knows exactly how to implement it. Another option is shell. The Bourne Shell has long existed as an interpreter for UNIX systems. UNIX administrators often use shell to write simple scripts for system maintenance, such as regular backup and file system management. Shell can connect many functions in UNIX like glue. Many programs with hundreds of lines in C language can be completed with only a few lines in shell. However, the essence of shell is to call commands. It is not a real language. For example, shell does not have a numeric data type, and addition operations are complex. In short, shell cannot fully mobilize computer functions.

Guido hopes to have a language that can fully call computer functional interfaces like the C language, and programming as easily as shell. The ABC language allows Guido to see what they want. ABC was developed by the Dutch Institute of mathematics and computer science. Guido works in the Institute and participates in the development of ABC. The ABC language aims at teaching. Unlike most languages at the time, ABC aims to "make users feel better ". The ABC language is intended to make the language easy to read, easy to use, easy to remember, and easy to learn, and to stimulate people's interest in learning programming. For example, the following is an ABC program from Wikipedia, which is used to count the total number of words in the text:

Copy codeThe Code is as follows:
How to return words document:

PUT {} IN collection

FOR line IN document:

FOR word IN split line:

IF word not. in collection:

INSERT word IN collection

RETURN collection

How to define a function. A Python programmer should easily understand this program. The ABC language uses colons and indentation to represent program blocks. There is no semicolon at the end of the line. There are no parentheses () in the for and if structures (). The value assignment uses PUT rather than the common equal sign. These changes make the ABC program read a piece of text.

Despite the good readability and ease of use, the ABC language is not popular in the end. At that time, the ABC language compiler needed a relatively high-configuration computer to run. These computer users are generally proficient in computers. They are more concerned with program efficiency than their learning difficulty. In addition to hardware difficulties, the design of the ABC language also has some fatal problems:

Poor scalability. ABC is not a modular language. If you want to add features in the ABC language, such as graphical support, you have to change a lot.

I/O cannot be performed directly. The ABC language cannot directly operate the file system. Although you can import data through text streams, ABC cannot directly read and write files. The difficulty of input and output is critical to computer languages. Can you imagine a sports car that cannot open the door?

Excessive innovation. ABC expresses the meaning of a program in a natural language, such as how to in the above program. For programmers, however, they are more accustomed to defining a function using function or define. Similarly, programmers prefer to use equal signs to allocate variables. Although the ABC language is very special, it is difficult to learn.

Difficult to disseminate. The ABC compiler is large and must be stored on tape. At that time, when Guido was accessing, there was a large tape to install the ABC compiler for others. In this way, the ABC language is difficult to spread quickly.

In 1989, Guido began to write the Python compiler to pass the Christmas holiday. The Python name is from Guido's beloved TV series Monty Python's Flying Circus. He hopes that the new Python language meets his ideal: to create a fully functional, easy to learn, and extensible language between C and shell. As a language design enthusiast, Guido has tried to design a language. This is just a pure hacking behavior.

The birth of a language

In 1991, the first Python compiler was born. It is implemented in C language and can call library files in C language. Since its birth, Python already has core data types including classes, functions, exception handling, tables and dictionaries, and a module-based extended system.

Many Python syntaxes come from C, but are strongly influenced by the ABC language. Some regulations from the ABC language are still controversial today, such as forced indentation. But these syntax rules make Python easy to read. On the other hand, Python's smart choice follows some conventions, especially the C language conventions, such as regression equal sign assignment. Guido believes that there is no need to be overly entangled in things established in "common sense.

Python was particularly designed for scalability from the very beginning. Python can be expanded at multiple levels. You can directly introduce the. py file at the higher level. At the underlying layer, You can reference the C language library. Python programmers can quickly use Python to write. py files as expansion modules. However, when performance is an important factor in consideration, Python programmers can go deep into the underlying layer, write C Programs, compile the. so file into Python for use. Python is like building a house with steel structures. It requires a large framework first. In this framework, programmers can freely expand or change.

Initially, Python was developed entirely by Guido. Python is welcomed by colleagues from Guido. They quickly gave feedback on usage and participated in Python improvements. Guido and some colleagues form the core Python team. They spent most of their spare time on hack Python. Later, Python was extended beyond the Institute. Python hides many machine-level details and gives them to the compiler for processing, highlighting the logic-level programming thinking. Python programmers can spend more time thinking about the logic of the program, rather than the specific implementation details. This feature attracts a large number of programmers. Python has become popular.

My life is short. I use python

Heroes of the Times

We had to pause our Python time and look at the ever-changing computer industry. In the early 1990 s, personal computers started to enter ordinary homes. Intel released the 486 processor, and windows released a series of windows systems starting with windows 3.0. The computer performance is greatly improved. Programmers began to focus on the ease of use of computers and the graphical interface.

Windows 3.0

With the improvement of computer performance, the world of software has begun to change. Hardware is sufficient to meet the needs of many pcs. Hardware manufacturers even desire the emergence of high-demand software to drive the upgrade of hardware. C ++ and Java have become popular. C ++ and Java provide the object-oriented programming paradigm and rich object libraries. C ++ and Java greatly increase program output at the cost of certain performance. The ease of use of the language has been raised to a new height. We still remember that one important reason for ABC failure is the performance limitation of hardware. In this regard, Python is much luckier than ABC.

Another quiet change is the Internet. In the 1990 s, it was still the era of personal computers. windows and Intel held a peak in the world with PC. Although the Internet-based information revolution has not yet arrived, many programmers and senior computer users have frequently used the Internet for communication, such as using email and newsgroup. Internet greatly reduces the cost of information exchange. A new software development model is becoming popular: Open Source. Programmers use their spare time for software development and open source code. In 1991, Linus released the Linux kernel source code in the comp. OS. minix news group, attracting a large number of hackers. Linux and GNU work together to form a dynamic open-source platform.

Hardware performance is not a bottleneck, and Python is easy to use, so many people begin to switch to Python. Guido maintains a maillist, which allows Python users to communicate via emails. Python users come from many fields with different backgrounds and different requirements for Python. Python is quite open and easy to expand. Therefore, when users are not satisfied with the existing functions, it is easy to expand or transform Python. Then, these users send the changes to Guido and decide whether to add the new features to Python or the standard library. This will be a great honor if the code can be incorporated into the Python itself or the standard library. Because of Guido's supreme decision power, he is called a "Lifetime benevolent dictatorship ".

Python is called "Battery sorted ded", which means it and its standard library are powerful. These are contributions of the entire community. Python developers come from different fields and bring their advantages to Python. For example, regular expressions in the Python standard library refer to Perl, while lambda, map, filter, reduce and other functions refer to Lisp. Some features of Python and most of the standard libraries come from the community. The Python community continues to expand and has its own newsgroup, website, and fund. Since Python 2.0, Python has also changed from the maillist development method to a fully open-source development method. The Community atmosphere has been formed, and the work has been shared by the whole community. Python has also achieved a higher speed of development.

Today, the Python framework has been established. The Python language organizes code with objects as the core. It supports multiple programming paradigms, uses dynamic types, and automatically recycles memory. Python supports interpretation and operation, and can call the C library for expansion. Python has a powerful standard library. As the standard library system has been stable, the Python ecosystem began to expand to third-party packages. These packages, such as Django, web. py, wxpython, numpy, matplotlib, and PIL, upgraded Python to a rich tropical rain forest.

Revelation

Python is an excellent and widely used language that advocates elegance, clarity, and simplicity. Python ranks eighth in the tibench ranking. It is Google's third-largest development language, the basic language of Dropbox, and the server language of Douban. The history of Python can be represented by many inspirations.

The community plays an important role in Python development. Guido thinks that he is not a full-fledged programmer, so he is only responsible for formulating the framework. If the problem is too complex, he will choose to bypass, that is, cut the corner. These problems are eventually solved by others in the community. Talent in the Community is exceptionally rich, and some people are willing to deal with the process of creating a website and raising funds, which is a little farther away from development. Today, project development is becoming more and more complex, and cooperation and openness become the key to project success.

Python has learned a lot from other languages, including ABC, C, Perl, and many other languages not listed. It can be said that the success of Python represents the success of all the languages it draws on. Similarly, Ruby draws on Python, and its success also represents the success of Python in some aspects. Every language is a mixture of excellent places, but it also has various defects. At the same time, the judgment of a language "good and bad" is often subject to external reasons such as platforms, hardware, and the times. Programmers have experienced many language competitions. In fact, to accept various languages with an open mind, programmers may mix their own languages like Guido on a given day.

Regardless of the future fate of Python, the history of Python is an interesting novel.


What programming language is Python?

Perhaps the people who initially designed the Python language did not expect that today Python will be so widely used in industry and scientific research. Eric Raymond, a famous free software author, listed Python as one of the four programming languages that hackers should learn in his article "How To Be a hacker, we recommend that you start learning programming from Python. This is indeed a pertinent suggestion. Python is one of the best choices for programming learners who have never learned programming or are not computer professional. Python learned Python for the first time. In less than 20 minutes, I stood in the bookstore and rummaged through a book that taught beginners to learn Python. Since then, I have been attracted by this magical language. Python can be used to develop things on symbian. The perfect combination of ease of use and speed Python is a very easy-to-use language. Many beginners of Java will be confused by the Java CLASSPATH, it took more than half a day to figure out that CLASSPATH had a wrong Hello World before it could run. This problem does not occur when Python is used. It can be directly used if it is installed. Python is a scripting language that can run directly after being written, saving the trouble of compiling links. For beginners who need more hands-on practices, there is no chance of errors. In addition, Python also has an interactive mode. If it is a simple small program, the editor can be saved and can be run simply by clicking in. Python is a clear language. using indentation to express the nested relationship of a program is a pioneering task. It upgrades the soft programming style of the past to hard syntax. There is no need to choose between different styles or dispute over different styles. Unlike Perl, Python does not have any obscure abbreviations and does not need to remember the meanings of various strange symbols. A program written in Python is easy to understand. This is the consensus of many people. Python is an object-oriented language, but its object-oriented language does not emphasize concepts as C ++ does, but focuses more on practicality. It is not to make the language complex to reflect the complete support for the concept, but to make programmers enjoy the benefits of object-oriented with the simplest method, this is one of the reasons why Python attracts many supporters like Java and C. Python is a language with rich functions. It has a powerful basic class library and a large number of third-party extensions, so that Python programmers do not need to envy Java JDK. Python provides a rich set of basic functions for programmers, so that people do not need to write the program at the bottom layer. Speaking of this, people usually use a worry: The scripting language is usually slow. The speed of running the script language is indeed slower, but the speed of Python is much faster than people think. Although Python is a scripting language, it can also be compiled, just like compiling a Java program, to compile a Python program into a special ByteCode, the execution is ByteCode, saving the analysis and interpretation of the program text, which naturally improves the speed. In Java programming, people advocate a method of Pure Java, except that everything on the virtual machine is written in Java. No matter the basic data structure or graphical interface, Pure Java's SWING, it has become a nightmare for countless Java application developers. Python advocates practicality. Its overall environment is written in C. Many basic functions and extended modules are written in C/C ++, when executing this part of code, the speed is the speed of C. The startup speed of a common desktop program written in Python is not much different from that written in C. In addition, through some third-party software packages, the source code written in Python can also be run in a JIT-like way, which can greatly improve the speed of running Python code, for different types of code, there will be a speed increase of 2 to 100 times. Python is a language I have seen, combining ease of use and speed... the rest of the full text>

Computer Language Development History

1. Machine language

2. Assembly Language

3. Advanced Language

Related Article

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.