Forgot your password?
typodupeerror
Programming Software IT Technology

Guido van Rossum Interviewed 226

Posted by CowboyNeal
from the getting-to-know dept.
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."
This discussion has been archived. No new comments can be posted.

Guido van Rossum Interviewed

Comments Filter:
  • Python (Score:2, Interesting)

    by Anonymous Coward
    I want to learn python, where should I start? I have looked at it breifly before, but now I actually have time to learn it. Any good pointers?
    • To just start learning, python's website is a good starting point. it has a lot of good beinner resources.
    • Start here (Score:5, Informative)

      by niom (638987) on Saturday August 16, 2003 @01:12PM (#6712874)
      That's what says in the link to the Python tutorial [python.org]. 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 [python.org] can come very handy too.
    • Re:Python (Score:5, Informative)

      by maharg (182366) on Saturday August 16, 2003 @01:15PM (#6712883) Homepage Journal
      I learnt from the book "Python Essential Reference" - see Amazon's page [amazon.com]. It has an excellent first chapter which will give you an excellent grasp of the fundamentals. Good luck, and have fun :o)
    • Re:Python (Score:5, Informative)

      by holovaty (678950) on Saturday August 16, 2003 @01:19PM (#6712899) Homepage
      I highly recommend Dive into Python [diveintopython.org], a free online book that's targeted at experienced programmers.
      • I second that (Score:3, Informative)

        by stewby18 (594952)
        It's a great reference. I taught myself quite a bit of Python from scratch using only that "book". Very clear, and very comprehensive. The fact that it's free, and downloadable in a variety of forms, just makes it even better.
    • 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

      • I've been coding for several years now, both professionally and as a hobby, in maybe a dozen different languages (most of those as a hobby). I love Python. I'm addicted to it. And I love Nutshell books (I have 13 or more), but I don't care that much for Python in a Nutshell. Nutshell books are best when they are a high-density first read and a great reference afterwards. This one, however, has too much of a narrative thread to be a great reference and yet at the same time that narrative is not well wove
  • For those with OpenZaurus, install the python packages and learn it between meetings/classes/etc.
  • Can anyone (Score:3, Interesting)

    by Timesprout (579035) on Saturday August 16, 2003 @01:13PM (#6712876)
    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.
    • by TuringTest (533084) on Saturday August 16, 2003 @01:23PM (#6712921) Journal
      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 [pm.org] (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.

      • You should say "easier to read then perl" because I don't think it's easier to read then ruby or php or even java. But then again just about anything is easier to read then perl. Perl code looks like it's cursing at you.

        • You should say "easier to read then perl" because I don't think it's easier to read then ruby or php or even java

          I think that Python is a lot easier to read than Ruby or Java. Ruby allows a lot of the same punctuation-based idioms that make Perl so difficult to read and Java is too verbose to be easy to read. Consider the Java version of hello world:

          class HelloWorldApp {
          public static void main(String[] args) {
          System.out.println("Hello World!");
          }
          }

          Cheers,
          Brian

        • You should say "easier to read then perl" ...

          Of course. Python is executable pseudocode, but Perl is executable line noise. (First saw this on the Slashdot "wisdom line". :-))

        • by supton (90168) on Saturday August 16, 2003 @08:31PM (#6714627)

          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.

          • Of course it's possible to write crappy code in php just like it's possible to write crappy code in python. For example neither language mandates classes.

            As for you other critisims I think they are offbase. Both languages use include() hell all languages have some sort of an Include. PHP does not "encourage" inlining of code, smarty is an official part of PEAR but neither does it force people to use smarty. Finally speaking for myself I don't think I have ever used eval() nor seen it used in any major proj
    • Re:Can anyone (Score:3, Interesting)

      by pioneer (71789)
      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
      • by einstein (10761) on Saturday August 16, 2003 @01:36PM (#6712988) Homepage Journal
        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!
        • Re:Can anyone (Score:4, Insightful)

          by Malcontent (40834) on Saturday August 16, 2003 @04:14PM (#6713660)
          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?
        • Re:Can anyone (Score:4, Interesting)

          by be-fan (61476) on Saturday August 16, 2003 @07:45PM (#6714481)
          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.

      • 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).


        At first:

        Lisp alone is only Lisp, if at all, some should use a lisp with oo extensions.

        Even the simplest pascal algorith is hard to be coded in "pure" lisp, as you have to do the trick of converting all "record" like data structures in list/lisp like equivalences.

        Second:
        Some people thin
    • I guess the advantages are really quite subjective i.e. it depends what languages you are coming from, and also depends on what you need to get done.

      I came to Python from Perl, dealing mainly with text manipulation and glue-type applications, in which both Perl and Python are very adept languages. For me, Python was a breath of fresh air, - no more curly braces, indentation became an integral part of the code, rather than an annoyance (when it went wrong), and mainly, Python is OO by design, whereas in P
    • Re:Can anyone (Score:5, Interesting)

      by Telex4 (265980) on Saturday August 16, 2003 @01:29PM (#6712956) Homepage
      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...)
      • Re:Can anyone (Score:3, Informative)

        by pioneer (71789)
        Concerning advantages of Phython

        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.

        Alright, lets set something straight here. The world is on a huge object oriented high. As has been said about strict types, object oriented programming is a hammer and everything all of a sudden looks like a nail.

        Any language that is
        • Re:Can anyone (Score:2, Informative)

          by tordia (45075)
          Any language that is *only* objected oriented is forcing you to look at everything as nails.

          From the Learning Python book [oreilly.com] (see sec. 1.1.1.1):

          Of equal significance, OOP is an option in Python; you can go far without having to become an object guru all at once.

          So, while Python supports object oriented programming, it doesn't force you to use it.

        • Any language that is *only* objected oriented is forcing you to look at everything as nails.

          You don't have to use Python's object oriented features. For example, you can find all of the 22-character long English words with only the tiniest sprinkling of OO:

          >>>for w in filter(lambda x: len(x) == 22, file('/usr/share/dict/words').readlines()): print w

          electroencephalograph
          Mediterraneanizations

          OTOH, people high on OO could write:

          >>> print 22. __add__(3)

          25

          Python gives you both

          • >>> print 2.__add__(3)
            File "<stdin>", line 1
            print 2.__add__(3)
            ^
            SyntaxError: invalid syntax
            >>>

            Hum, seems you cannot do that. Of course, in Ruby you can do 10.+(29)
            • It looks like I made a typo. You need a space between the 2 and the '.', otherwise Python thinks it's a float literal.

              Try:
              2 .__add__(3)

              or even:
              2. .__add__(3)

        • Re:Can anyone (Score:3, Informative)

          by Dan Ost (415913)
          OOP is a part of Python the way that OOP is part of C++.
          It's available if you want to use it, but you're not forced to
          use it when it's not appropriate.
        • Re:Can anyone (Score:2, Informative)

          by ZvlvLord (200368)
          Ok I'll bite =)
          ANYTHING that you can do in Lisp/Ocaml (and other functional languages), you can do in Python. Go read a bit. Python does not force you into any style. You're free to use whatver you want.
      • "Python uses indentation to denote code blocks, rather than curly brackets {} or other methods."

        Personally I think this is a flaw and not a feature. One of my pet peeves is scrolling to the end of some function and seeing this.
        }
        }
        }

        With python you don't even have that.

        I like the php alternative best.

        endif;
        endwhile;
        endforeach;
        }
      • Re:Can anyone (Score:3, Informative)

        by Meowing (241289)

        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.

    • Re:Can anyone (Score:5, Informative)

      by fredrikj (629833) on Saturday August 16, 2003 @01:31PM (#6712963) Homepage
      You might find Eric S. Raymond's take on the question [linuxjournal.com] quite informative.
    • Re:Can anyone (Score:5, Informative)

      by merlin262 (677269) on Saturday August 16, 2003 @01:34PM (#6712977)
      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.
    • Re:Can anyone (Score:5, Interesting)

      by JanneM (7445) on Saturday August 16, 2003 @01:37PM (#6712990) Homepage
      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.

      • Re:Can anyone (Score:5, Interesting)

        by ultrabot (200914) on Saturday August 16, 2003 @02:36PM (#6713272)
        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 :-)
        • C++ and tuples (Score:3, Informative)

          by rjh (40933)
          If you haven't already checked out Boost [boost.org], now would be the time. Boost provides tuples in C++.

          And regarding your example code, the same can be done trivially in C++ with the added significant bonus of strong static typing:

          typedef std::vector<std::pair<std::string, std::string> > StringPairVec;

          StringPairVec tuples = AddressBook.getEntries();
          for (StringPairVec::const_iterator i = tuples.begin() ; i != tuples.end() ; i++)
          std::cout << i->first << " lives in " << i->sec

          • Re:C++ and tuples (Score:3, Interesting)

            by ultrabot (200914)
            And regarding your example code, the same can be done trivially in C++ with the added significant bonus of strong static typing:

            Yes, I have written code like this, and generally like STL (too bad I can't use any of it for my work). However, it requires quite a lot of typing, and the resulting code is not as easy to understand.

            Three lines of Python, three lines of C++ (barring the typedef, which is only there to make the rest of it easier to read).

            And therein lies the catch, typedef is needed.
          • Re:C++ and tuples (Score:2, Informative)

            by chgros (690878)
            i++
            You should always use the prefix increment ++i when using STL iterators (although in the case of vector they might just be typedefs for pointers).
            The reason is that since the postincrement must return the previous value, the iterator has to be copied.
            • According to the latest spec, a vector iterator is a pointer. And besides, I'm not going to optimize my code before I run it through a profiler--premature optimization is the root of all evil.
        • Explicit typing (Score:2, Informative)

          by Homburg (213427)
          First off, as others have pointed out, you don't need to introduce a new class to do this kind of thing - C++ has vectors and pairs built in, and tuples will probably be in the next version of the standard.

          However, you're right about the 'easy to instantiate' part, but I don't think static typing is really the problem. The problem with types in C++ is that you have to explicitly mention them, when a lot of the time the compiler could figure them out itself. In your example, you could do:

          std::vector<std
          • C++ has vectors and pairs built in, and tuples will probably be in the next version of the standard.

            Not built-in enough; In python I can do:

            mylist = [("hello",3),("world",4)]

            Additionally, some environments shun STL (and templates in general) because it leads to code bloat.

            There's been some discussion about introducing type-inference into the language, so you could say:

            auto entries = get_address_entries();


            Like that is ever going to happen... I don't even think any C++ compiler has achieved ISO C++
      • ...The great benefits of these interpreted languages are that they make development very fast, compared to the more...

        No. That's a big advantage, but the really great advantage is that you can modify things on the fly. You can add methods to a class, or to objects of a class, during the execution of the program. You can create code that you then execute, etc. (I know that you *can* do that in C... but just try it!)

        Lisp has most of the advantages that I mentioned in the preceeding paragraph, but it is
      • by Decaff (42676)
        Java is almost never interpreted these days. Its loaded as virtual machine byte code, then dynamically profiles, optimized and run as high-performance native code in almost all situations. High quality VMs (such as those from IBM) can run many Java apps as fast as C/C++. Saying that perl/python and other scripting languages beat Java in terms of speed is simply typical Slashdot anti-java FUD.
        • by Anonymous Coward
          >> Saying that perl/python and other scripting languages beat Java in terms of speed is simply typical Slashdot anti-java FUD.

          Actually, it's not FUD.

          For string processing, database access, and pretty much...well...everything, Perl *smokes* Java. Python is slower than Perl, but Guido acknowledges that.

          Also, though one can buy into the Java Marketing Machine and proclaim that there is indeed a "Virtual Machine" and "Java is not interpreted", in fact, very few languages are actually "interpreted" i
          • Now let's talk about memory footprint and how small you can make Hello World + the interpreter be in Java. I can get it disk space to 500k (with PAR) without even trying. The python folks can do similar with py2exe.

            You can write "Hello, world!" in only 500k?

            I'm impressed. In my youth, we did it using feeble tools like x86 assembler on MS-DOS, and it required a massive 25 bytes, more than half of them taken by the string in question.

            I know about apples and oranges, but I can't help wondering if the w

          • For string processing, database access, and pretty much...well...everything, Perl *smokes* Java.

            Links to studies? Statistics?

            Java bytecode is produced from source, but this bytecode, too, must be executed as data, not as a native instruction.

            If you'd read the actual post you responded to, you'd learn that bytecode is nowadays compiled to native instructions.

            All of this is relatively meaningless; arguing that Java's "virtual machine" is not an interpreter does not say anything for the language

            Of

      • Re:Can anyone (Score:3, Interesting)

        by smallpaul (65919)

        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:) ).

        I don't think that is really true. How cheap and easy is it to make a COM object or Java class in Perl? What if you want

    • Why I like Python (Score:2, Insightful)

      by Anonymous Coward
      I like Python because:

      1) Indentation instead of bracing. Yes, I know some people hate it but for me it makes the structure so clear.

      2) Object orientation. I did OO with C++. I actually understood it with Python.

      3) The smoothest ever integration to low level languages like C. Gotta love it.

      4) Easy to learn. Write ab initio code with C/Fortran and never-programmed-before people interface it with Python [fysik.dtu.dk]. Then, grind out those MSc and PhD theses...

      • 2) Object orientation. I did OO with C++. I actually understood it with Python.

        No suprise here:) C++ implimentation of OO is marginal to say the least. The syntax agrees to the letter of OO design, but not the spirit. The result is that most C++ code consists of procedural function dressed up in OO clothing. Many of the advantages of OOD can not be realised in C++ without some ugly code ( uglier then it already is). I learned OOP in the late 80s the hard way, by implementing all of the concepts and all of

    • Many very useful third party modules [vex.net] has been the draw for me.

      I don't have much experience with other scripting languages, but I've found python to have a lot of very easy to use modules. I've found modules for polynomial fitting to data, large data sets, polygons operations - just out there when I looked for them. And many a useful library in C or C++ has been wrapped in Python. For example, I've written some CAD software (for very specific design operations we do where I work), and needed a way to me

  • by Anonymous Coward on Saturday August 16, 2003 @01:27PM (#6712939)
    Interviewer: Why did you make whitespace significant in Python?
    Guido: I smoked a lot of crack that day.
  • by henriksh (683138) <hsh@freecode.dk> on Saturday August 16, 2003 @01:27PM (#6712946) Homepage
    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.
    • 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.

      Could you please explain how PERL and Python serve different purposes?

      I'm curious because I use Python for exactly the kind of stuff that I used
      to use PERL for. The whole reason I found Python was because I was looking
      for a substitute for PERL. After having used Python for some time, I've
      discovered that certain things are easier in Python than PERL, and vice
      ver
      • 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 ar

      • by elflord (9269)
        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 t

  • by oodl (398345) on Saturday August 16, 2003 @01:29PM (#6712958)
    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.
    • by fredrikj (629833) on Saturday August 16, 2003 @01:48PM (#6713035) Homepage
      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 [sourceforge.net], 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.
      • > You don't need macros since Python is dynamically
        > typed and even functions are first-class objects.

        You don't even know what you are missing. :-)

        Lisp and Dylan are dynamically typed with functions as first class objects. However those features are orthogonal to a true macro system... They're not related. A true macro system allows a capable programmer to extend the language itself. Need a new control struct to lock a resource and then automatically unlock it at the end of the block of code? W
        • Thinking of it, you could do that as well by writing a function that takes a string of Python code as input, does magic, and then passes it on to the interpreter for regular evaluation.

          Not necessarily a good solution, but it might work.
          • You could implement that as a top-level function or even as a class method, and it would just work. And it would be easy to understand and program (something which, I believe, Lisp macros aren't).

            The only difference I think it would have is that it would run at execution time, not compile time. But I'm sure that a not too far away future version of Python will do that... ;-)
    • by Ian Bicking (980) <ianb.colorstudy@com> on Saturday August 16, 2003 @02:57PM (#6713345) Homepage
      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)

    • Python comes with a module that will give you the parse tree of any expression as nested Python lists, similar to what READ does in Lisp. I don't know if it can actually turn a modified tree back to executable code, but I can tell you, once you have looked at such a parse tree, you don't want to modify Python parse trees anymore.

      Java's adding a *lot* of features that Dylan has had since its inception, such as keyword arguments

      Java is adding keyword arguments? Any pointers for that? How does it work with

  • Favorite quote (Score:2, Interesting)

    by henriksh (683138)
    Favorite quote from the interview:
    ORN: I sometimes think it's a good job nobody has patented breathing; otherwise we'd all owe them money.


    GvR: I guess there was prior art among the reptiles [smiles].
    Heh.
    • This is mine (Score:3, Interesting)

      by TuringTest (533084)
      ORN: This resonates with your long-held interests in "computer programming for everyone". Don't you think that perhaps "everyone" is too broad, and that there aren't at least some people who will never be capable programming a computer?

      GvR: That's a deep philosophical question. I'm optimistic about that in theory.

      [...]

      Given that I believe everybody can learn to read and write, given the right education and circumstances--obviously if your parents have no money and you're sent to work when you're seven ye
  • Python is great. (Score:5, Informative)

    by metatruk (315048) on Saturday August 16, 2003 @01:39PM (#6713001)
    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 [ibiblio.org] as the course textbook. I recommend this text to anyone interested in learning Python as a first programming language.
  • My experiences (Score:3, Interesting)

    by Gorny (622040) on Saturday August 16, 2003 @01:48PM (#6713037) Homepage Journal
    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.
  • Why python rules (Score:3, Informative)

    by joib (70841) on Saturday August 16, 2003 @02:32PM (#6713253)
    There's a fairly detailed interview with bruce eckel ("famous" guy who has written c++ and java books and sits on the C++ standards committee) at artima [artima.com] on why he likes python (I linked to the last part of the article series, since that contains links to the previous ones).
    • Great interview. Choice quote:

      I feel Python was designed for the person who is actually doing the programming, to maximize their productivity. And that just makes me feel warm and fuzzy all over. I feel nobody is going to be telling me, "Oh yeah, you have to jump through all these hoops for one reason or another." When you have the experience of really being able to be as productive as possible, then you start to get pissed off at other languages. You think, "Gee, I've been wasting my time with these oth

  • by Slothrup (73029)
    I guess one difference is that it has a long history, since it was first distributed in 1991. In those days nobody talked about "open source", and Richard Stallman [founder of the Free Software Foundation] wasn't very well known and the GNU General Public License didn't exist.

    WTF? The GPL didn't exist in 1991? I guess I was hallucinating when I was using GNU Emacs and GCC in the 80s.
    • Inaccuracy about GPL (Score:3, Informative)

      by solferino (100959)

      van Rossum :

      I guess one difference is that it has a long history, since it was first distributed in 1991. In those days nobody talked about "open source", and Richard Stallman [founder of the Free Software Foundation] wasn't very well known and the GNU General Public License didn't exist.

      parent poster (Slothrup) :

      WTF? The GPL didn't exist in 1991? I guess I was hallucinating when I was using GNU Emacs and GCC in the 80s.

      Yes, I was also surprised at this large factual error.

      GPL Version 2 [fsf.org] : Jun

  • Surnames starting with "Van" ("from") are Dutch, like Guido.

    "Von" is the German version. Dutch people don't like to be taken for Germans, for historical reasons..
  • by Doppler00 (534739) on Saturday August 16, 2003 @06:35PM (#6714223) Homepage Journal

    GvR: ...I do it myself by staying where I am and giving keynotes at conferences and making my personal life the subject of discussions on Slashdot. ...

    ORN: Perhaps they should get lives of their own instead of discussing yours?

    I think he's talking about us...
  • by Nice2Cats (557310) on Sunday August 17, 2003 @03:01AM (#6715636)
    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 [python.org] is. I've asked some amazingly stupid questions in my time, and they have been very gentle and kind.

We don't know one millionth of one percent about anything.

Working...