17 September 2006

Why I Love Python

Plenty of people, including die-hard lisp-heads and big names in the open source field, have already written about why they love Python. Google does most of their new development in Python, and it's cut their development cycles radically. And Python is the language behind BitTorrent, without which I wouldn't have been able to download replacements for all the CDs that have been stolen or broken over the years (not that I would ever do such an illegal thing). Any company that uses Java or C++ or .NET without thinking about Python first is giving a sure sign that they don't know what they're doing. (Of course I still end up working for them. Well, if they're going to throw money away, I'll take some of it.)

But forget about the technical merits of high-level languages, the beauty of indentation as structure, the interactive environment, etc. You can find all of that in other languages, but none of them are Python. Here are some of the less-commonly given reasons why Python rocks.

First, there's the name. It started off as a Monty Python reference, which is a great way to declare uber-geekiness while (to distinguish it from C++) at the same time not taking yourself too seriously. The only way to top that would be to name the language after a Hitchhikers or Discworld reference, like Slartibartfast or Rincewind. And using spam and eggs instead of foo and bar makes it impossible for any Python user to deny being a geek.

The fact that Python is also the name of a snake (not to mention the Israeli update to the Sidewinder missile) made it way too easy for O'Reilly to come up with the cover for their "Programming Python" book (unlike, say, caml, which is named for animal already in use by Programming Perl). However, now that Python is big news, the community has to worry about offending ophidophobes and Christians--so all of the old logos involving snakes and/or 16-ton weights (especially the MacPython logo, with a realistic snake wrapped around an apple) had to go.

This led to one of the most entertaining discussions I've ever seen, as hardcore geeks tried to figure out how to be politically correct. And the resulting logo is pretty cool, too.

In fact, the Python development lists are often entertaining to read, which I can't say about any other language.

Then there's the fact that Python's Beneficial Dictator For Life has the same name as Risky Business's Killer Pimp (played by Joe Pantoliano in what I think was his first major role). Yes, his name is Guido--and he's not even Italian; he's Dutch. How cool is that?

Python is also the only programming language with its own font (designed by Guido's brother Just).

Pythonistas (and isn't that much cooler than "C++ experts" in itself?) talk about the Zen of Python, and really mean it. Try typing "import this" into a Python interactive session.

Meanwhile, while C++'s big future plans are for a "200x" version, and Perl is looking ahead to a version 6 that may come out any decade now, Python is looking ahead to the year 3000. When we're all disembodied software agents, we will reprogram ourselves in Python.

Then again, what do I know; I used to code in Forth.

No comments: