HOST: Chris DiBona (head of Google open-source website) and Leo Laporte (founder of Twit website)
Interviewee:
Guido van rosum (founder of python)
Chris DiBona: I'm very glad Guido asked me to make arrangements for this interview.
Leo Laporte: here we need to explain that Guido van rosum created the python language 16 years ago and now he is working on google.
Chris DiBona yes. He has been working there for a while.
Leo Laporte: Google is a big python user. First, let me ask you a question. guido is about the origins of python. If I make a mistake, please correct it. As far as I know, python was originally designed for teaching purposes. Do you want to create a language for learning and programming?
Guido van rosum: Well,
Many people think this is a good question, because it allows me to trace the background of python. Python inherits many things from a language called ABC, while
The ABC language is especially designed for teaching. It was in the late 1970s s and the early 1980s S.
The language Implementation Group, where I joined the Language Design Discussion, language implementation, and brainstorms, was quite exciting. At the end of and, I felt that it was necessary to create a new language,
I borrowed abc
I like the features in the language, and replace the things I don't like with my own innovative ideas or some ideas that I use for reference elsewhere. My goal is to build a scripting language for professional programmers.
Industry programmers mainly use C and borne shell scripting languages as their main development languages. The location of python is probably between C and Shell.
There is no clear purpose for creating python.
Leo Laporte: this is interesting.
Guido van rosum: Because I have learned so much from the ABC language, and ABC itself has the purpose of teaching, the language I set up is very suitable for teaching.
Leo Laporte: People ask me many times, and I recommend python to them every time. Because it is free and cross-platform. It's easy to use the interpreter to teach programming. You can immediately try to use the interpreter to learn the language.
Guido van rosum: That's right. This is something I learned from ABC. ABC also has these features.
Does Chris DiBona have strict blank format requirements for ABC?
Guido van rosum: ABC also requires forced indentation.
Leo Laporte: I think this is what many people complain about. I don't care about it. Are you aware of this problem?
Guido van rosum: I'm not sure what you said is always a problem, and I don't agree with what you said. In most cases, this is a convenient excuse for people not planning to learn python. If you ignore this, you will find that this indent requirement is pleasant.
Leo Laporte: You can write beautiful source code, and it is easy to write. Why are you designing this.
Guido van rosum: I used it from ABC, and I like it very much. This design may be based on innovation. They have a lot of experience in algo and algo 60 Language Styles. begin and end statements are quite troublesome. When indentation does not match the program structure, keyword alone may also lead to errors in understanding,
Chris DiBona begin end.
Guido van rosum: Yes, the number of begin and end may be different.
Leo Laporte: the advantage of replacing begin end with blank is to force programmers to use a large number of indentation, so that programmers can immediately understand the program structure after seeing the code.
Guido van rosum: For a long time, everyone has the idea that any self-disciplined programmer can use indentation at will. This means that when a person looks at the code, he looks at indentation to understand the structure of the entire program, but in fact he is in braces.
Leo Laporte: Like a perl programmer, I shouldn't have said that.
Chris DiBona, you're fighting.
Leo Laporte
Guido van rosum: This is good.
Chris DiBona I found that python is easier to maintain from a project or company perspective. Do you agree with this from one person to another?
Guido van rosum: Yes, I totally agree. This is not the purpose of my specialized language design. The text we printed on some T-shirts is actually a joke. We have a slogan called "There is only one way to do it" (There is only one way to do it)
Leo Laporte: opposite to perl's "There is moer than one way to do it" (There are many ways to do one thing)
Guido van rosum: Yes, you may argue that this is indeed important to maintainability. There are many ways to do one thing. If you give a task to two different programmers, they may provide two completely different solutions.
Leo Laporte: I think programmers like this.
Guido van rosum: Well, if you submit a task to two programmers, they will provide two solutions, which is no problem. However, if A programmer needs to maintain B's code at A certain time point, he may rewrite the code rather than maintain the code, because this is not the solution selected by A programmer.
Chris DiBona is worth mentioning that there are many basic program computing tasks.
Leo Laporte: Yes, bubble sort, binary sort
Chris DiBona is too basic. In this case, it is obviously not true.
Guido van rosum: As I said, T-shirts are a joke.
Chris DiBona is interesting when talking about T-shirt. For example, Simple is better than complex.
Guido van rosum: I think you are talking about another T-shirt. We have something called Zen of Python, which is not so much technical information as poetry. It contains several.
Leo Laporte: I think of python as a very beautiful language. It reminds me of C, but it is clearer and simpler than C. It supports many library functions and is highly efficient in development, it runs fast.
Guido van rosum: Are you learning it now?
Leo Laporte: Yes, it is easy to learn.
Guido van rosum: Very interesting. You compare it with C. In fact, it is very different from C. You can say it is more like lisp than C.
Leo Laporte: but on the surface, it looks like...
Guido van rosum: Yes, you are totally right. On the syntax surface, it looks like C. I have been learning from C, C language is one of the reference points for designing python. In my mind, I have always considered the programmers who use C to write code and Shell to write code. This is a typical program module of programmers in 1980s.
Leo Laporte: Let's go back to C lisp. It looks like C. In fact, its bottom layer is more like lisp. Real Programmers like Lisp and tell me why?
Guido van rosum: the connection between Python and lisp is very limited, because although Python has many built-in lisp-style things, I didn't understand lisp at all when I started to create python, I still basically don't understand lisp. I have never written any program in LISP, even a small project.
Leo Laporte: Do you use Python written in C?
Guido van rosum: Yes, the main implementation of python is to use C
Leo Laporte: Is there Python implemented by lisp?
Guido van rosum: I do not know.
Leo Laporte: there must be Java implementation.
Guido van rosum: Jython is written in Java and compiled as a Java bytecode. The person who established Jython actually recently created the iron Python project, which runs on. net, written in C.
Leo Laporte: So what is the lisp style of python? In terms of structure, how does Python solve the problems solved by lisp?
Guido van rosum: Lisp
The main similarity with python is that everything is dynamic at runtime. Similar to lisp and Python analyzer, the compiler does not know what is happening in the program.
The Python analyzer knows at least the definition of IF Statements, modules, and functions, but it does not know the types of any numeric values you want to operate in the program. If you are explicitly using Python
The program writes x + y, and X and Y can be of any type. You can perform Operator Overloading in other languages, such as C ++. The Compiler always knows exactly what A and B are.
Which class belongs to the module, and in Python, the compiler does not know or care about this. They generate the same Python bytecode, which can act on any support +
Any object that is overloaded by the addition operator.
Guido van rosum: it allows you to write programs in an exploratory way. You do not need to explicitly select a type, class, or interface before you start programming.
Chris DiBona no matter whether the type is correct or not
Guido van rosum: This
One of the advantages of this sample is: If you write an error, if you write a program in Java, you may need to refactor your project, change the type of some parameters, and use Python
, Your code may require very few changes, because a lot of information in the program is not clearly declared, and there are not so many duplicates. In Java
You will declare the type many times, each method has some types of declarations, a parameter declaration. C ++ has the same problem:
Of course, this is no exception. Basically, static language has the same problem. When your idea changes, your program needs to be modified a lot. What is a type, how it works, how it is used, and how it is used in Python?
All information is obtained at runtime. You only need to change the source of the original variable and all the changes will be automatically transmitted in the program.
Leo Laporte: I really want to hear about it (haha). Eric Ramond wrote a famous article six years ago. He said that he didn't like python very much at the beginning, but now he is sure that this is the language he needs. Does he still use Python programming?
Guido van rosum: I don't know. You should ask him, I hope he is still using python, and he may be enjoying his life as a famous open source advocate and well-received writer.
Leo Laporte: What about you? Are you still programming?
Guido van rosum: I am always programming. I work at Google. When I am not doing Python communication, I write applications for Google to serve Google's development group, what I developed does not touch Google users, but targets Google engineers.
Leo Laporte: Are you still working on the python process?
Guido van rosum: Now
Well, I have tried my best to delegate most of Python 2-related jobs to trusted people. I'm glad to watch them work and never intervene. I have not stopped developing python.
I am more concerned with the next Python version, which we call Python 3000. You can also think of it as Python 3.0.
Chris DiBona: Yes, the new version number.
Guido van rosum: yes, we came up with this name. It came from Microsoft's radical promotion of Windows six years ago. I think we can do better.
Leo Laporte: It's 1000 better than it.
Guido van rosum: Well, this means we won't have any issue with release time, so it can be released a little later.
Chris DiBona, so is Python 3000 considered five years ago?
Guido van rosum: No,
It has long been a mysterious future version. In the last six months, I have done a lot of work to keep it on track. I wrote some demos to illustrate the entire development process and Python 3000
Some features, as for the release time, I hope to release an alpha version next year, that is, in the early 3.0 s. Python 2008 will be available to a wide range of users after one year ()
Python community user release. But this does not mean that the user needs to switch to the new version immediately. Because the old and new versions are incompatible, this is why we call it python.
3000. This is an opportunity for me to correct some design mistakes I made as a beginner in programming language design in the early 1990s S.
Chris DiBona what's wrong?
Guido van rosum: Well,
The time is too short. It is hard to say that it is clear.
I am not correct about exception handling, the design of user-defined types, the design of Integer Range, the error of integer precision, and some less important syntactic inconvenience. We try to fix all
But do not lose backward incompatibility. Sorry, It is not lose backward compatibility. However, in some cases, it is difficult for you to fix errors and maintain backward compatibility. So, instead of in each new version, 2.0,
Some minor but uncomfortable incompatibility is retained in 2.3, 2.4, and 2.5. We chose to save these steps to keep an incompatible version, python 3
Leo Laporte: Some people are looking forward to technical updates, such as multi-processor systems. I know that the multi-thread support for python is good. Maybe we should...
Guido van rosum: multi-threaded support is not what I plan to handle now. I think of it as a quality problem, not a language standard problem. What we expect and want to work with is to use a better way to support unicode. Basically all characters will be unicode, And we will include an independent data type to represent non-character types.
Chris DiBona I think unicode is very good in java.
Guido van rosum: We certainly use java for reference.
Chris DiBona is really a good idea.
Guido van rosum: python is very open to learn from other languages, and I have never been ashamed to acknowledge the characteristics of python, you can say that the biggest drawback of python is probably that it was invented by me.
Http://blog.csdn.net/koalant/archive/2007/05/14/1607902.aspx