alan little’s weblog
more thoughts on python
11th December 2003 permanent link
David Pinn asked me what I now think of python.
I’ve been using python part time for a few months now, and I’ve already written enthusiastically about it several times. It’s a really nice language. I find some parts of the class system a bit obscure and wacky, but in general I love it. It’s concise, elegant, powerful, and treats the programmer as an adult. It assumes you know what you’re doing and can generally be counted on to behave decently. Very unlike, say, perl – concise and powerful, undeniably, but “elegant” only for very specific values of elegant – or java, with its paranoid nanny of a compiler that assumes you are an imbecile.
If a piece of design tells you about the designer as a person – and I think it does – then Guido van Rossum must be a seriously nice guy.
However. A serious modern development environment needs more than a nice language. It needs solid, standard frameworks for web applications, GUI development, interacting with common databases and crunching XML. The standard GUI doesn’t even have to be any good – just look at Java. Python has (nearly) one of the above.
The XML tools, from what I’ve seen, are excellent. So far my weblog tool gets by with the standard libraries, and if I wanted to get more sophisiticated it’s not at all clear to me whether I should be using 4suite or libxml2. But either way, in this case there’s no doubt that I can get something that is powerful and reasonably standard and supported. From what I’ve seen of third party python libraries so far, though, I suspect installation of either of them on OS X might not be completely plug’n’play.
For GUIs, python has nothing that comes as standard. wxPython seems to be the current preferred cross platform library, but the only wxPython GUI I’ve actually seen – the Chandler alpha release – looks dreadful. I hope it’s just because they haven’t got round to addressing look & feel yet – but if Chandler is supposed to be some wonderful poster child for open source, cross platform end user apps with a professional standard of fit & finish, perhaps they should. PyObjC sounds like it might be the way to go for Mac GUI development, but it’s not cross platform.
Web applications. Complete shambles. There’s no standard way of even hooking up to a web server, never mind application frameworks. If I want something better than CGI, what’s the official (sanctioned-by-consensus would also suffice) equivalent to mod_perl or mod_php? Is it mod_python? mod_snake? Neither? How am I supposed to know? And if I want to go more towards frameworks, there’s zope which has a reputation for being very powerful but a bit of a wierd & wonderful self-contained world, webware which is a nice prototype, and seemingly dozens of other ideas floating around in various states of half-finishedness. This is a bad mess. What to do about it is a constantly recurring topic on comp.lang.python – more of my thoughts on the matter in this discussion.
For databases – well, I haven’t got round to trying to fix the mysql installation for OS X. But to not work with the most popular open source database on the most popular desktop unix: really not good.
Compare and contrast Java. Java is the COBOL of the 21st century. It’s nowhere near as nice a language as python, but it’s not all that bad. The world (especially Bangalore) is full of competent Java programers. It has stable, standard libraries and frameworks for doing just about anything you could possibly imagine (even GUIs if you don’t mind them being ugly and slow). It’s no wonder it has solidly established itself as the standard language for corporate back office development.
Whereas python is a lot of fun, but I have a hard time seeing how I could seriously recommend it for anything except fairly small standalone projects at the moment. Which is a shame.
related entries: Programming
all text and images © 2003–2008