Two nights ago I was able to attend a talked titled "Python: Building an Open Source Project and Community" given by the creator of Python himself at Xerox Parc.
Guido is a funny man (the name python is from "Monte Python" not the animal python) and shared his experiences and the reasons behind python.
I'll share a few of the things that were interesting:
* Guido currently works (since 2003) at a "stealth mode" startup Elemental Security, that is working on policy compliance. The code consists of java and python. He wrote 20k of the 30k lines of python code.
* Encapsulation is poor in python. There are no "private" variables. But this design makes it trivial to create a profile, debugger and provide introspection.
* Language Design: He wanted python to be flexible and extensible. I believe that this is one of the key areas
that led to the community around python. It is easy to write modules for the language so gui, db, web people can all create modules for their own needs.
* Someone asked why python programs can run for days on end while other languages (specifically java in this case) run out of memory. Guido traced this back the the simple design of the garbage collector which is
doing reference counting (plus stuff to detect loops), while other runtimes implement more difficult memory management schemes which lead to greater overhead (in startup time) and more complicated design.
* Of the "P" languages (perl, python, php) he said the PHP is the most successful because it delivers a specific need to a niche. But he said that the design of the language itself is poor. 5.0 and newer versions
should address some issues.
* According to the Burton Group, programmers are "5 times more productive" when using "P languages". Also, the Burton Group said that python is the "preferred" p language for application development. Guido attributed the productivity increase (for python at least) to the fact that python code is much shorter (he said around 5 times) than c,c++,java because there is much less syntatic sugar (no type declarations). He also said that he feels programmers productivity is bounded more by lines of code than functionality of code. Thus a 500 line python program is more maintainable than a 2500 line c program that does the same thing. (Guido also admitted that there are places where python is not appropriate, writing a mp3 decoder is an example). He also said that most programmers are not fit to do memory management (c/c++).
* When asked about static type checking, he basically said that it was a crutch. The "benefit" of static type checking was that the compiler would warn you of type mismatches. Guido claims that these errors will be caught be unit testing anyway. (and since java developers are supposed to be writing unit tests the value of static typing erodes) The harder type of bugs (value errors) will not be caught by the compiler. (see
http://www.mindview.net/WebLog/log-0025 for Bruce Eckel's take on this, author of "thinking in java").
* Python is object oriented, procedural and functional. Guido said he didn't really know what functional means, but Paul Graham does, and he says that "python is most like lisp", so that makes it a good langauge. (see paul grahams essay on python
http://www.paulgraham.com/pypar.html where he makes other interesting claims about python and google).
* Licensing: Guido says wished he could keep the python license to 2 paragraphs, but the lawyers say that "can't be a license". He feels good that the license is OSI approved. He says that half free licenses won't work (free to universities but not for commercial). He also says that opensourcing abandonware won't make it popular ("if your software isn't used before it is opensourced, it won't be afterwards"). He also noted that python's license was "non-gpl" so people would feel comfortable using python in their environment.
* Debugging: Guido uses print statements for 90% of his debugging and a debugger for the times when his brain stops working or he has to debug some wierd code that someone else wrote.
links: digg this del.icio.us reddit