Slashdot Mirror


Guido Von Rossum on Python

deran9ed writes ""People can get quite emotional about Python, in a way they rarely get about software," says van Rossum, who is now director of Python Labs at Digital Creations. In this question and answer interview, he explains why Python deserves such loyalty, when it is better to use Python than Perl, and why increasing numbers of business applications developers will be using Python for years to come. THe full article is on SearchEnterpriseLinux"

19 of 260 comments (clear)

  1. Re:No, why NOT! by costas · · Score: 3

    Yeah, I used to make fun of that too. I'll tell you a little (true) anecdote: I first heard of Python here on /. and its reliance on whitespace for code structure. I laughed and thought that was *such* a stupid idea.

    I found it so funny in fact, that I went back to a couple of colleagues and started using Python as the punchline to an in-house joke: you see at the time we were looking for an embeddable scripting language. Python became a threat: "you'd better not do that, or I am gonna embed Python in the server".

    Then, I started running into Python on the net, first because of Zope (of course) then on other cool little projects. I started to get curious, and downloaded the language and ActiveState's win32 extensions. I picked a small in-house project to test it on and I was pleasantly surprised: I went from making fun of it to piping serialized Python objects over HTTP (from NT to Unix and back no less) in --literally-- 3 days.

    I dunno what your measure of a good language is, but that ease of use and versatility sold me. And, BTW, Python is now my company's embedded language of choice.

  2. Learn Python and decide for yourself by f3e2 · · Score: 3

    Learning Python is not hard (remember how long it took you to learn Perl?) -- you can do it in an evening by reading any one of these free (and Free) online books:

    • Dive Into Python - written for the Slashdot crowd, it assumes you know one real language (like Perl, Java, or C++) and takes you from there. Steps through real code to teach you the language basics (and not-so-basics), and makes frequent comparisons to the language(s) you already know.
    • How To Think Like A Computer Scientist (Python version) - better for those with less programming experience. Not as detailed, but gentler.
    • Learning To Program - for those with no programming experience whatsoever who want to learn Python as their first programming language.

    Once you've read any or those, you'll want to dig into some real code, so head over to the Python Knowledge Base for tons of real code examples, and Vaults of Parnassus for tons of free third-party modules and libraries.

    -M

  3. Getting Stoned by kfg · · Score: 3

    Actually, the Stones dissed the Beatles shamelessly and nearly incesantly. It was, in fact, part of their 'image.'

    When a reporter went up to Jagger and told him the Beatles had broken up and asked for his reaction he replied, " Great, that means that now WE'RE #1!"

    Little did he suspect that 30 years later the Stones would still be touring, and that the Beatles would STILL be outselling them.

    Kinda like loosing an election to a dead guy.

    KFG

  4. Zope by AirSupply · · Score: 3
    I've been Zoping for a couple of weeks now, and I'm getting the hang of it slowly. I think it's a damn handy content management system, the kind of which most web developers seem to re-invent every time they do a project, only they don't do it so well as Zope. Having more or less completed a teeth-cutting project on it, I'm of the opinion that it's the best available choice in its class. Maybe I just don't know about the better alternatives — I'm interested in hearing about options. Even so, I'd be game to undertake a small-but-serious project in Zope now, such as an Intranet or simple user-manageable website.

    On the other hand, I have issues with Zope. The documentation is incomplete, and the help system has big smokin' holes in it. There's a Zope documentation project, but I have a problem with systems like this where the code is the spec, and the documentation is being written from that — my own particular anal retentiveness factor, I suppose. Zope doesn't behave quite the way I intuited in the getting-to-know you phase of our relationship, and I've had to readjust my think for a number of Zopisms as I go. Also, the naming conventions (plural) suggest to me a certain cobbled-together-ness — an impression which is carried further by the spotty documentation, etc.

    If you want to know about my personal bias in languages, I think Perl is truly amazing in the sense that any language which is so butt-ugly in terms of its syntax and structure (inheriting from C, AWK, and shell scripts???) can be so mind-bogglingly useful and easy to use in practice. On the other hand, all the Perl hackers I've worked with produced utterly vile code. Mind you, they produced pretty damn awful C too. I'd prefer to be working in Python if I had to work with them.

    And of course I do work with them, but the powers that be won't let us use Python on the basis that it's not a skill you see on resumes as standard yet. Thank God for The Corporate Mentality, no?

    --

    AirSupply: go ahead, cut me off.

  5. Re:This just in! [Here's what Larry Wall thinks] by hobuddy · · Score: 5

    "Perl is worse than Python because people
    wanted it worse." - Larry Wall, 14 Oct 1998

    --
    Erlang.org: wow
  6. cross-platform by Scrymarch · · Score: 3
    I don't know much about Python... but is it very cross-platform? Is there a reason you'd use Python over Java if you wanted to run your application in a few different environments?

    The standard Python implementation is interpreted, it's as cross-platform as Perl or Java or whatever. There's also a pure Java implementation of Python, Jython, which I've found very useful as a scripting tool in a Java environment, as you get full access to Java classes from Python.

    Python is a scripting language, so I use it in preference to Java where a script is called for, eg - rapid development environments.

  7. Article says very little about merits of language by dkwright · · Score: 3

    What I got from the article:

    Python is a cleaner language, thus better for larger projects and teamwork.

    Granted, if true, that's a worthwhile thing. But's that's precious little to say in the way of discussing a language, and it's quite vague. C'mon, how about some more discussion of features of the language. How about some real comparison, with say, strengths and weaknesses of Perl. My knowledge of Python (almost zero) has increased not one bit after this article.

    Basically, the article amounts to: Hey, I wrote Python and I like it. It's better than things I didn't write.

    Is this an interview or a press release?

  8. No, why NOT! by slashkitty · · Score: 3
    Ahhggg. This brings back horrible memories of huge FORTRAN that would be flattened by one *SPACE* out of wack. It's a pain. A real pain. It's the reason I won't even look at Python as a language for me.

    Don't get get me wrong, attention to detail in programming is a good idea. Formatting your programs is very important. Spaces should not be. They are the void on the page. Various editors treat spaces, that is, it's harder to manage in some. It's just a shame that they put this 'feature' in a language.

    --
    -- these are only opinions and they might not be mine.
    1. Re:No, why NOT! by scrytch · · Score: 3

      > The trick is to use a decent editor which has good syntax highlighting

      And install it on every last machine you will ever find yourself editing code from, in every environment you could possibly use, making sure you got your bases covered for editors on Solaris, BSD, Linux, MacOS, Windows, and textboxes in browsers. Have you ever edited a script in ed? I have (termcap was way too messed)

      Or you could just use ruby which is much less noisy than perl but not whitespace-dependent.
      --

      --
      I've finally had it: until slashdot gets article moderation, I am not coming back.
  9. This just in! by Chester+K · · Score: 5

    ...and just as newsworthy....

    Larry Wall thinks Perl is pretty cool.

    --

    NO CARRIER
  10. more technical by jobber-d · · Score: 4

    If you're looking for a more technical summary of Python, you can always read Eric Raymonds thoughts on it. you can find it here. http://noframes.linuxjournal.com/lj-issues/issue73 /3882.html

  11. ramblings by deran9ed · · Score: 4

    First off sorry for the typo on submission of the article... Tom Christiansen wrote a nifty little comparison between Perl vs. Python. I've used Python quite a few times and don't know Perl well enough to even consider myself a programmer. However many times I've had to modify plenty of Perl scripts in order to use certain things I found useful, and one reason I would use Python over Perl is its ease of scripting. Perl can sometimes be confusing as heck.

    According to Jon Udell here are his findings on Perl vs. Python

    Perl Is Bigger, But Python Is Growing Faster.

    Python Is More Deeply Object-Oriented.

    Perl Is more Powerful And More Mature In Some Ways.

    Perl Lacks A Killer App, Zope Is Python's Killer App.

    Python Is Designed To Be A Good First Language For A Beginning Programmer, Whereas Perl Is Most Useful To Programmers Familiar With C, Sed Or Awk, And UNIX Command Idioms.

    His complete write up is here. (warning the article is a bit long... 4 pages)

    And finally Python Humor

    1. Re:ramblings by mlinksva · · Score: 4
      http://www.oreillynet.com/pub/a/python/2001/02/22/ pythonnews.html says
      John Udell once described Digital Creations' Zope as Python's killer app, the application that was going to have everyone scrambling to learn Python. It hasn't proved to be much of a killer though. Web designers looking for solutions to their documentation management problems routinely dismiss it as overkill, developers as underkill, or too hobbling.
      I haven't taken much more than a cursory look at Zope (several times over the last couple years), though that's about the impression I got: too much complication for too little gain.
    2. Re:ramblings by Spy+Hunter · · Score: 5

      From Python Humor:

      Python vs. Perl according to Yoda
      Subject: Python versus Perl: A humorous look
      From: funkster@midwinter.com
      To: guido@cnri.reston.va.us
      Date: 10 Jul 1999 01:45:07 -0700

      This has been percolating in the back of my mind for a while. It's
      a scene from _The Empire Strikes Back_ reinterpreted to serve a
      valuable moral lesson for aspiring programmers.

      --
      EXTERIOR: DAGOBAH -- DAY
      With Yoda strapped to his back, Luke climbs up one of the
      many thick vines that grow in the swamp until he reaches the
      Dagobah statistics lab. Panting heavily, he continues his
      exercises -- grepping, installing new packages, logging in as
      root, and writing replacements for two-year-old shell scripts
      in Python.

      YODA: Code! Yes. A programmer's strength flows from code maintainability.
      But beware of Perl. Terse syntax... more than one way to do it...
      default variables. The dark side of code maintainability are they.
      Easily they flow, quick to join you when code you write. If once
      you start down the dark path, forever will it dominate your destiny,
      consume you it will.

      LUKE: Is Perl better than Python?

      YODA: No... no... no. Quicker, easier, more seductive.

      LUKE: But how will I know why Python is better than Perl?

      YODA: You will know. When your code you try to read six months from
      now.
      --

      larry


      [me@localhost]$ prolog
      | ?- god.
      ! Existence error in god/0

      --
      main(c,r){for(r=32;r;) printf(++c>31?c=!r--,"\n":c<r?" ":~c&r?" `":" #");}
  12. Re:Don't use it. by k8to · · Score: 4
    1) Python has had license issues.

    Python is transitioning from a bsd-like license to a bsd-like license. Those who wish to get their knickers in a twist over the in-between phase are grasping at straws.

    Guido does not want to relinquish final control over Python, and he wants to get paid for what other language implementors do for free.

    Linus does not want to relinquish final control over Linux. What's your point? Guido is the BDFL (Benevolent Dictator for Life) but the license does not prevent one from making alternate versions, and in fact this has been done more than once.

    As for Guido wanting to get paid for doing Python work, sure.. why not? As for getting paid for what other people contribute, please explain yourself in some level of detail?

    2) Python is defined by it's implementation. There's no standard for developers to rely on. That means ultimately you are at the mercy of the good or bad judgement of the Python team.

    While there may no standards body stamping an official document, this statement also applies to Perl, TCL, and many other popular scripting languages in its class, as well as Java. In practical reality, there are mulitple implementations of Python which are in fact compatible, and have been multiple independent implementations for some time. I wouldn't get too worried about this "one implementation problem".

    3) New versions break old programs. I do NOT want my customers to have to have 2 or 3 versions of Python installed.

    The python 1.x -> 2.0 transition was painless for all those I have spoken with. I have not had any of my code hiccup or cough at all except perhaps to tell me that some packages have been deprecated over the years, though they still work.

    If you compare this to the K&R -> ANSI C transition, or the TCL 7 -> 8 transition, or some of the severl perl transitions, it's a walk in the park.

    4) There are better alternatives. Lisp or Ruby.

    While these languages are interesting, they do not have the same advantages as Python. Some examples would be a clean readable language, a cohesive standard library, a simple syntax, and a strong OO heritage pulling from background such as smalltalk. Ruby and Lisp do interesting things of their own, but are not languages I would consider in the same breath. Ruby, FWIW, suffers from the same above problems as Python.

    --
    -josh
  13. Learn Ruby by Steeltoe · · Score: 3
    I'm currently learning Ruby, and MAN is that a beautiful OO-language. My only nit-pick about it so far is that it is not constrained enough, contains a few non-intuitive wrinkles and ambiguities, and don't really treat code as data (as Lisp do). However, I'm certain that it can either be extended (in runtime) to become more constrained (types, const, real protected object methods and variables, private/protected inheritance etc), or its going to develop a standard set of- or arbitrary concepts of constraints.


    For RAD Ruby is a clear-cut winner. You have many high level concepts available in the language or the accompanying library (which is almost the same, since it's true OO). The most important and visible: each. No more for (i=sz; --i >= 0; ). Its also got lamdas, closures and eval. If there are some concepts missing in the language, it's usually possible to extend the language and reuse that extension again and again. At no cost of readabilty as in Forth. Oh, and did I mention everything is an object?


    Whatever you can do in Python, Perl or Smalltalk, you can do in Ruby (as a language at least). The accompanying libraries are pretty sweet too. Try it, you'll like it.


    - Steeltoe

  14. Python should be everywhere... by costas · · Score: 4

    ...but it's not there yet.

    I have respect for Perl (hell, I have respect for any general-purpose language than can beat egrep in text searches), but Python is my weapon of choice.

    What people are missing in this forum is that Python is probably the most extensible language out there: there are at least 4 different interpreter implementations for Python (and I don't mean OSes): there's C-Python, there's Jython (in Java), there is Stackless Python and there will be a Python.NET. That's versatile guys, much more so than any other 4GL language out there.

    Also, Python is hacker-friendly: armed with a couple of tools and a C compiler anybody can embed the interpreter in their own app or extend Python with existing C, C++, Fortran, Java, or even Perl code. Trust me, it's much easier than you think.

    Python is easier for begginers to pick up: if you have a diverse group of people with different skills, you can use Python as a lingua franca. No reason to explain the legacy behind $_ or other such awkiness :-)

    Most importantly though, a choice of language is a personal one: I liken Python code to a mathematical proof: it's clean, it's elegant, and if it's written by someone else a reader can easily pick up its deficiencies. Perl tends to be more like poetry: it can be beautiful (like that great DeCSS hack) but its beauty is subjective, and much like poetry a lot of people may never 'get it'.

    At any rate, if you are a Perlista and you're here flaming away because of the whitespace thing, go to python.org and try the language out. My bet is that you will be happy to have done so.

  15. Python does kick ass by kevin805 · · Score: 3

    I've written a pretty good amount of absolutely hideous Perl code (maybe 10000 lines total -- hey, I'm still a student), and maybe even once a clean, reusable program. But the latter are the exception. Perl lends itself to stream of consciousness programming, which is great when you want to write a quick script to do something, but doesn't lend itself to later revision.

    I'm learning Python now. It's a much cleaner language. Consider the following Perl:

    for($i = 0; $i < 10; $i += 2) {
    print $i;
    }

    And the same in Python:

    for i in range(0,10,2):
    print i

    It's just easier to read. The main reason I don't feel like continuing on in Perl is because I once seriously shot myself in the foot due to Perl's lack of easy to use and easy to understand complex data structures. Python has classes, which are just like JavaScript (really just hashes), but the syntax makes them usable.

    And error checking as well. The following is probably wrong Perl:

    $variable = 1;
    print $varaible;

    But it isn't an error. The following causes an error in Python:

    variable = 1
    print varaible

    If I wanted an undefined value, I can, of course, create one:

    variable = None
    print variable

  16. Re:Python and Propoganda both start with the lette by Voivod · · Score: 3

    I have seen a plethora of projects successfully that used Perl, and exactly zero that used Python.

    Yahoo, Google, and eGroups all use Python extensively.

    So in your future ignorant flames, you can now say: Besides the biggest portal, the best search engine, and the most popular e-list site, I know of zero sites that use Python.