Slashdot Mirror


Guido van Rossum Interviewed

Qa1 writes "Guido von Rossum, creator of Python, was recently interviewed by the folks at O'Reilly Network. In this interview he discusses his view of the future of Python and the Open Source community and programming languages in general. Some more personal stuff is also mentioned, like his recent job change (including the Slashdot story about it) and a little about how he manages to fit developing Python into his busy schedule."

29 of 226 comments (clear)

  1. Start here by niom · · Score: 5, Informative

    That's what says in the link to the Python tutorial. It's quite good to get you to know the language and does not require a lot of previous programming experience. Then, the library reference can come very handy too.

    --
    -- Repeat with me: "There is no right to profits".
  2. Can anyone by Timesprout · · Score: 3, Interesting

    explain what the major advantages of using Python are. I have only ever looked at it very briefly and even more briefly at Jython. From this very limited experience I cant really think of a compelling reason to use Python over some of the more mainstream languages, other than perhaps as a scripting type glue.

    --
    Do not try to read the dupe, thats impossible. Instead, only try to realize the truth
    What truth?
    There is no dupe
    1. Re:Can anyone by pioneer · · Score: 3, Interesting

      explain what the major advantages of using Python are. I have only ever looked at it very briefly and even more briefly at Jython. From this very limited experience I cant really think of a compelling reason to use Python over some of the more mainstream languages, other than perhaps as a scripting type glue.

      If you are using Java then python is a step up because it offers first class functions and some other incredibly power constructs.

      Unfortunately, although Python's effort is applaudable, it really is only a first class imperative language that has added some features of Lisp.

      If you are going to chose a new language to learn, then you should be learning Lisp. Most people avoid it because it looks complicated but, believe me, after using in for many years, Lisp is gorgeous.

      I highly suggest you check out Paul Graham's website and read his articles about Lisp before you waste anytime learning any other language.

      All languages nowadays are slowly adding individual pieces of Lisp functionality. Why not just use Lisp (no reason to wait a decade for all the "popular" languages to finally come fill circle and become Lisp dialects).

    2. Re:Can anyone by Telex4 · · Score: 4, Interesting

      Compared to the other "scripting" languages I know (Perl, Bash, PHP, so fairly limited), Python has a few major differences:

      o Python uses indentation to denote code blocks, rather than curly brackets {} or other methods. This, along with a few other layout rules, makes Python code very strictly laid out. This makes it both easy to read and code, and you really don't miss being able to use your own crazy layouts (ahhh, perl ;)

      o Python is totally object orientated, and very intelligently designed in this department. Whereas in Perl (5) you have to jump through hoops to create objects, especially OO modules, in Python it's as easy as assigning a variable a new value.

      o Python has quite a few very useful built in object types, including strings, ints, floats, lists, tuples, dictionaries, functions, classes, and more. This makes things easy if you don't want to make complex matrices. It is also easy to make more complicated types by embedding C...

      o It is really easy to embed C/C++ code in Python, and vice versa, so where Python suffers on performance you can boost it with C/C++, or use a Python tool appropriately called "boost"

      Generally, Python is very handy for anything from one-time dirty scripts to full applications (there are some good GUI toolkit ports about.. PyGtk, PyQt, PyKDE, wxWindows, etc), and is also very handy when developing prototypes.

      But what really makes me like Python (as I'm not a language nerd by any measure) is that it is just *easy* and *fast* to code in... it doesn't get in your way.

      (Pimping out...)

    3. Re:Can anyone by fredrikj · · Score: 4, Informative

      You might find Eric S. Raymond's take on the question quite informative.

    4. Re:Can anyone by merlin262 · · Score: 5, Informative

      Note: my knowledge of python is somewhat limited as I just started using it, so if there are errors here, I apologize.

      1. Python as a scripting language has several features seen in Objective C(and other similar languages) not found in C++. Class members can be detected and bound at runtime, further it's possible to search a classes members for information.

      2. Pydoc and documentation strings. Python has built in support for documentation strings, and a great utility for automatically generating documentation. Documentation is actually a part of the programming language, and not an after-market add-on.

      3. Dictionary objects, tuples, lists - are all part of the basic language. Dictionary objects allow interesting hash tables to be created without much effort at all. This feature is seen in Perl.

      4. Maybe a miss feature, but enforced indentation creates much easier to read code.

      5a. The shelf object. This essentially allows any object to have it's runtime information stored in an easy and effecient matter. It can then be reloaded after a run.

      5b. The pickle object again allows objects to easily be stored in files.

      6. Python is _EXTREMELY_ easy to extend using the Python C API.

      7. Python includes functional programming aspects such as mapping and lambda forms.

      8. Python includes an extremely complete library that does just about everything one would desire to be able to do. Using the python runtime library allows your code to be easily portable without the headaches involved in C/C++ porting.

      9. Using psyco, it's possible to have Python code JIT on i386 processors. This gives a significant performace boost.

      10. A development community and support community second to none.

      There are other aspects that I haven't touched on here, but these are the major things I've found helpful so far.

    5. Re:Can anyone by einstein · · Score: 4, Funny

      Lisp programmers scare me. Someone mentions a feature that lisp has had for a few years, and invariable some lisp guy comments on how it's the future! switch now! Look at all the babes I attract with my Lisp skillz!

    6. Re:Can anyone by JanneM · · Score: 5, Interesting

      Depends on what you mean.

      Python, Perl and Ruby are all very good interpreted, flexible, rapid-prototyping languages. They all have their relative strengths and weaknesses, but all are good enough that if you are choosing between them, it boils down pretty much to your own preferences and what coworkers and other people around you use (or on what animal you prefer on the cover of your reference literature:) ).

      If you mean this class of languages as opposed to C, C++, Java and so on, well, it becomes a matter of what you want to accomplish. The great benefits of these interpreted languages are that they make development very fast, compared to the more traditional languages (yes, Java is interpreted, but it is still designed as a traditional language). You spend more time solving your task and less time managing the mechanics of development. Also, they really make use of the benefits of being interpreted with things like closures, dynamic code evaluation and so on. And they typically have very complete, transparent access to the surrounding system - why spend two days writing some hairy functionality when you can trivially filter your data through an external application that already does the whole job for you? Do not underestimate "scripting type glue".

      They do make a pretty good fit running large systems - the Swedish pension management system is all written in Perl, for instance, and Zope is written in Python. They are also quite efficient; they are on the whole as fast as a Java implementation, and occasionally (when the task plays to the specific language's strengths), quite a bit faster.

      I typically use C/C++ and Perl for development, and every time I've been using Perl for a while, I get bouts of frustration with traditional languages for the lack of such things as hash datatypes and inline regular expressions. But for some tasks, traditional languages are the way to go.

      --
      Trust the Computer. The Computer is your friend.
    7. Re:Can anyone by ultrabot · · Score: 4, Interesting

      I typically use C/C++ and Perl for development, and every time I've been using Perl for a while, I get bouts of frustration with traditional languages for the lack of such things as hash datatypes and inline regular expressions.

      I'm a professional C++ programmer, and a devout pythonista. What I miss most in C++ are the easy-to-instantiate datatypes like tuples. It's so much easier to pass a relatively simple datatype as a tuple, as opposed to introducing a whole new class and even *gasp* a new file to do the trick.

      For example I can trivially code a function that returns an array of (name, address) tuples, and I can easily manipulate such an array:

      tuples = get_address_entries()
      for name,address in tuples:
      print name,"lives in",address

      After doing Python for a while, one sees how much static typing gets in your way of doing things the "proper" way, and very often one tries to avoid doing the damn thing at all... resulting in a sub-optimal design. Python allows you to be all you can be :-)

      --
      Save your wrists today - switch to Dvorak
    8. Re:Can anyone by Malcontent · · Score: 3, Insightful

      By the same token it does bother me that people are constantly re-inventing things that have been around for a long time.

      I look around and it seems to me like most "new" things in CS have been around for 20 years. Why is everybody so intent on rewriting smalltalk and lisp? Does it seem strange to you that every language eventually starts looking like smalltalk and lisp?

      --

      War is necrophilia.

    9. Re:Can anyone by be-fan · · Score: 3, Interesting

      While Lisp programmers can be scary* there is some element of truth to it. I was trying to extend SCONS (a build system) to make it easier to use while building my OS kernel. I needed to have lots of conditionals, to handle varying platforms and build situations. Now that I look back on it, there are a lot of Lisp ideas in there. Specifically, if code is data, then data should be code, right? So I ditched my original idea of using an XML file format, and decided to use regular python scripts as the config files. It worked like a charm, and the resulting build system was flexible enough that when I applied it to a later project for work, I only had to write a couple of dozen lines of build scripts for a complicated project that needed to build on Linux, Windows, be configurable to use various CORBA ORBs, and have switchable drivers at compile time.

      More and more, I'm thinking corporate America is decades behind what the academic world takes for granted. XSLT, for example, is something that never should have happened. And its not just Lisp. Take, for example, DAML+OIL. Its an XML-based language that can make statements in first order logic that can be verified by a theorem prover. Its so complicated and verbose, that its nearly impossible to write by hand, and most people use GUI tools to work wih it. In the next version, they're adding support for limited execution capability (ala XSLT). Meanwhile, I'm thinking, "hello --- Haskell?"

      *> My impression of this mainly comes from comp.lang.lisp. I find some of the people who hang out there to be among the rudest I've seen on the Internet. Some pricks, like Eric Naggum (search for "arrogant" on c.l.c in Google Groups and see who gets the first 20 hits...) are actually revered for their rudeness! It might just be there are more math/pure-science types on that board, and while they're definately smart, they can also be rather rude.

      --
      A deep unwavering belief is a sure sign you're missing something...
    10. Re:Can anyone by Meowing · · Score: 3, Informative
      Python is totally object orientated

      Not really. 2.2 and up get a little closer to that, but Python is really a procedural language with a very nice but very optional set of OO features. (Internally, the Python and Perl OO implementaions are very similar, even if Perl's hideous object syntax does a good job of hiding it.) This is a nice pragmatic approach, akin to what Objective C does.

      If OO purity is one of those things that appeals to you, Ruby or Smalltalk might be fun toys.

    11. Re:Can anyone by commodoresloat · · Score: 3, Funny
      Why is everybody so intent on rewriting smalltalk and lisp?

      Because they get embarrassed trying to make smalltalk with a lisp.

  3. Re:Python by maharg · · Score: 4, Informative

    I learnt from the book "Python Essential Reference" - see Amazon's page. It has an excellent first chapter which will give you an excellent grasp of the fundamentals. Good luck, and have fun :o)

    --

    $ strings FTP.EXE | grep Copyright
    @(#) Copyright (c) 1983 The Regents of the University of California.
  4. Re:Python by holovaty · · Score: 5, Informative

    I highly recommend Dive into Python, a free online book that's targeted at experienced programmers.

  5. The MAJOR advantage is simplicity by TuringTest · · Score: 4, Informative
    The second name of Python is "Executable Pseudocode".

    Sure you can do the same things in other languages, at the end all general languages are Turing Machine equivalent. The difference is that Python is EASY to read (according to Master Yoda). It is bottom-up designed to be.

    So it is good not only for scripting, but too for prototyping and for everything which needs to be flexible and not too much efficiency-critical. The logic of some videogames is encoded in Python, you know.

    --
    Singularity: a belief in the "God" idea with the "demiurge" relation inverted.
  6. From the interview by Anonymous Coward · · Score: 3, Funny

    Interviewer: Why did you make whitespace significant in Python?
    Guido: I smoked a lot of crack that day.

  7. Python vs. the others by henriksh · · Score: 3, Interesting

    I think Python has a very bright future. For many purposes, it obsoletes Java. Java is more widespread than Python now, but it's proprietary and suffers from a historically slow GUI.

    Many people use Python for tasks they used to do in Perl, but I don't see Python replacing Perl. They serve different purposes, for the most part.

    Ruby is also an interesting language, although I don't personally know much about it, except that it aims to be truly OO. Again, slightly different purposes, but I don't think Ruby will ever be very widespread.

    1. Re:Python vs. the others by henriksh · · Score: 3, Interesting
      Could you please explain how PERL and Python serve different purposes?
      For one thing, Perl is much more used by UNIX (*BSD and GNU/Linux included) system administrators. Some people think Perl is more in the UNIX spirit than Python.

      Python focuses more on OO issues and the Pythonic way. Perl is more versatile in terms of syntax.

      Basically, there's some differences in the overall design philosophy.

      But you are right. You can easily use Python for things you used to do in Perl and vice versa. But there are still things I'd rather use Perl for than Python.

    2. Re:Python vs. the others by elflord · · Score: 3, Informative
      Could you please explain how PERL and Python serve different purposes?

      Perl is a better shellscript than shellscript. Systems administrators who are tired of dealing with the horrors of shell script like perl. Perl is also great for text manipulation. One can write insanely powerful and terse code for this in perl (like sed on steroids). People who yank a lot of text around (web developers, sys admins) often like perl for this reason.

      Python is more of a "programmers language". You can't write insanely terse code in python, because the python philosophy dictates that the code should be comprehensible. You can still write concise code, but you can't "code in grunts" like you can in perl or bourne shell script.

      Python has a cleaner OO model (not bolted on). It's easier to extend (via C or C++). It also makes a good high level wrapper for C or C++ libraries. It is infinitely better than perl for coding GUIs.

      That's about all I can think of for now.

  8. Is Python still lacking a macro system? by oodl · · Score: 3, Interesting

    Any real geek knows that a language that isn't self-extensible through its macro system (ala Lisp, Scheme, Dylan) is just plane lame. :-)

    I haven't been following python for a long time, though I've used it for a few projects. I know a lot of Lisp-like features such as lambda, eval, etc. have been added to it. (Java's adding a *lot* of features that Dylan has had since its inception, such as keyword arguments... but adding those features to Java makes the language even more ugly.) But what about a real macro system (and I don't mean a C style macro system)? I assume that it would be difficult to incorporate into Python because the Python syntax is not as consistent as the Lisp-family languages.

    I assume that Python is still not efficiently compilable either, right? I think Guido was discussing a sealing mechanism for Python similar to Dylan's. Gywdion Dylan can produce code that's as fast as code written in C... and there's still many more optimizations that can be implemented into the compiler.

    1. Re:Is Python still lacking a macro system? by fredrikj · · Score: 4, Interesting

      Any real geek knows that a language that isn't self-extensible through its macro system (ala Lisp, Scheme, Dylan) is just plane lame. :-)

      You don't need macros since Python is dynamically typed and even functions are first-class objects. At least I know I never missed the C preprocessor after moving to Python :P

      I assume that Python is still not efficiently compilable either, right?

      Not quite. There is however a dynamic compiler called Psyco, which works by creating static versions of functions at run-time to reduce type-checking.

      My own experience is that Psyco makes Python code about 400% faster in real applications. Still an order of magnitude worse than C, but comparable to or better than other languages when it comes to tasks that Python used to do significantly slower.

    2. Re:Is Python still lacking a macro system? by Ian+Bicking · · Score: 4, Insightful
      No, Python doesn't and won't have a macro system. The Lisp features like lambda and map are kind of in disrepute, at least from Guido's perspective -- see comp.lang.python for many opinions on the matter. Since Guido is Benevolent Dictator For Life, his opinion holds a great deal of sway. (BTW, map has been replaced with list comprehension, taken from Haskell, so it's not like functional programming as a whole is being rejected)

      Macros would indeed be more difficult to implement in Python, because data and code are not as interchangable as in Lisp (e.g., (car 1 2) being code, '(car 1 2) being data). Macro-like manipulations of Python code would be rather difficult. But there has been discussions about ways of achieving the same flexibility without quite so much generality.

      In a related example, some people feel that code blocks, ala Ruby or Smalltalk, are the right way to do control structures. Indeed they are very general. Python instead has developed notions of iteration, generation, and the use of first-class functions, and together they are all quite general as well -- you can do what you need to do. While more eclectic than anonymous functions/lambdas/closures, they are arguably more transparent -- you don't know what a function might do with a code block, and it can greatly effect surrounding code.

      So it is with macros -- they are extremely general, and can do unexpected and magic things, (which is not in fitting with core Python principals). As Python grows alternatives, more things need to be built into the languages, but the result is a set of predictable and well-known idioms. Python is a full language, not the basis for other languages, as Lisp can become.

      As far as performance, there are a number of things like Psyco, Pyrex, Numeric, and Weave/SciPy, which can handle performance problems (noting that in most application performance is not a problem). The result is again somewhat eclectic, but pragmatic. There's a wide variety of ways to optimize a Python program, many of which are just normal programming optimization (caching, making a process persistent, lazy loading, etc), as well as Python modules written in C or other compiled languages (potentially aided by things like SWIG, Pyrex, or ctypes)

  9. Python is great. by metatruk · · Score: 4, Informative

    As a CS major, the intro CS classes at my school recently switched from teaching Java to Python. The class is designed to teach the fundamentals of computer science and computer pogramming. Python is extremely easy to learn, and quite powerful. We used the free text How to Think Like a Computer Scientist as the course textbook. I recommend this text to anyone interested in learning Python as a first programming language.

  10. My experiences by Gorny · · Score: 3, Interesting

    Very interesting interview. I've had many conversations with experienced programmers and with people who'd barely could program a Hello World in Python. After discussions we allways came out with Python to be the best language to learn to the newbies. It's nice, clean, dynamic-typed, which I find an important thing for someone new to programming, cause it lets you focus on the WHOLE thing and not on minor details (eg. details).

    I've been a Python user myself and I find it quite remarkable how it has evolved since its 1.5.2 to the pointer where they are now 2.3. More and more (interesting) software is being written for it. But evenly important is the code base of Python. It's C implementation is very clean written and very easy to use so one can write extension modules very fast.

    --
    Alan Perlis once said: "A language that doesn't affect the way you think about programming, is not worth knowing"
  11. Re:Python - Python in a nutshell by hashmap · · Score: 3, Interesting

    My recomendation:

    Python in a Nutshell by Alex Martelli

    Hands dow the best introduction to Python from a programmer's prespective. That is if you are already familiar with basic programming concepts. The great thing about the book is that covers just about every aspect in an extremely concise way that does not bore you to death.

    I'm a certified Java and XML developer, gave up on Perl long time ago, discovered Python, somehow got over my initial suspicions regarding the whitespace ... within two weeks it became my favorite language. I do just about everything in Python and it takes about 80% less effort. Love it baby!

    Quote of the week from the python newsgroup:

    "What can I do with Python that I can't do with C#?
    You can go home on time at the end of the day." -- Daniel Klein

    h

  12. Re:Unfortunately... Re:Don't fully agree. by __past__ · · Score: 3, Insightful
    so, the whole point is that Lisp is not a programming language but a kind of language definition language? Just a raw parse tree, and Build Your Own Syntax. See why I say it's difficult? You haven't ANYTHING done for you in advance.
    Oh, come on. Common Lisp has about 1000 defined symbols (i.e. variables, functions, macros, classes ...). It includes an extremely powerful exception system, highly flexible OOP, and all the mundane stuff like lots of standard datatypes, control structures, IO, pretty printing etc. People frequently bash it because it's too big.

    You don't have to do any kind of language design when you do Lisp programming. You can get a long way with just using plain function definitions. Yet you can easily define new syntaxes, control structures and stuff.

    never got to understand why Lisp programmers think of the macro system as the primary and more exclusive power of the language, now I start to see it. But how do to learn to create those domain-specific languages? It is so far away from conventional academic lectures, that one needs to forget almost everything to start thinking that way!
    Back when I was the proud owner of a Commodore C 128, I used to think similar things about useless stuff like GOSUB. Why can't we just stay with the more familiar GOTO that everyone understands?

    Get over it. Learning new tools is usefull, but it's work. Get a good book on Lisp macros, and dive in.

    And I'm not convinced that that syntaxlessness is indispensable. [...] I would prefer to have some syntactic sugar
    You are not alone. And, given that you can actually define a new syntax, many people tried to come up with alternatives to raw s-expressions. And indeed succeeded. However, none of these alternatives ever got too popular (the most successfull attempt might by the Dylan language, which started with s-expressions, but dropped them). People could have used alternative syntaxes, but the vast majority chose not to.
  13. PHP is not easy to read, in most cases by supton · · Score: 3, Insightful

    PHP suffers readability not in syntax, but in archetecure design. With global namespaces for module functions (say, for example, to FTP a file), you do not have the ability to trace the logic between source files and modules in someone else's code. In addition, PHP encourages the inlining of code in presentation, and most PHP code is not modular (some is) - but on top of that the most popular mechanism for code reuse is eval() and include(), which simply pop more crap into the global namespace without being explicit what they do.

    All this impacts readability. Python does not have these problems becuase it encourages explicit namespaces for all objects/modules/packages/classes/etc. Python also enforces readabilty by simple (easy) use of whitespace (this is a good thing.

  14. Great for the occasional programmer by Nice2Cats · · Score: 3, Interesting
    The good things about Python that the other posters mentioned are true, but there is one thing that I really love about the language: It not only fits into your brain, it also stays there, even if months pass between programming sessions.

    I don't get to program much, since I have a day job, and to make matters worse, my formal training with computers was brief. Basically, I learned Python on public transport, communiting to and from work (the Python Cookbook causes people to turn their heads, by the way). I tried learning Java at one point, but the problem is that there are too many details and formalisms that you have to remember to even get anything off the ground.

    Not so with Python. Basically, you just write what you want to code. Want to know if there are characters in a string?

    if 'chocolate' in mystring:
    ....print 'I love it!'

    (This is new in Python 2.3, and I can't get the indentation to work here). Fantastically intuitive.

    The only "problem" is the way the library keeps growing from release to release: Something that you had to code yourself a while back suddenly is a trivial feature. More of an embarrassment of riches than a real problem, but it does make you feel like a fool sometimes. "Why code that socket server? Just use..."

    One other nice thing about learning Python is how amazingly friendly and helpful their tutor list is. I've asked some amazingly stupid questions in my time, and they have been very gentle and kind.