[ View menu ]

Why choose Python?

I like writing code in Python, as much as I’ve enjoyed writing code in any other language (and I’ve written in a bunch commercially).

I got to thinking today about what it is that really makes Python a great language. In fact, it’s missing some features that I like (e.g. closures). Obviously it has a whole bunch of cool features, but then so do most of the other dynamic languages (like Ruby, PHP or Perl) — for those of you who don’t know me, I’m much happier in a dynamic/interpreted language environment than a static/compiled one (and yes I know those pairs don’t strictly go hand-in-hand)

After thinking it through, I realized that it’s the maintainability of Python that makes it great. I can read through any Python that someone in my whole company has written and understand it and know why it’s working the way it is. And so can anyone else on my team, even without huge depth of experience in the language. The choices that have been made about its structure and support make it inclusive for anyone to be a part of the community, rather than inadvertently excluding certain types of people.

So, Python is now officially my language of choice, because more than any other language, it makes my team a happier place and wants me to be part of its community.

2 Comments

  1. Steve says:

    Any reason in particular for choosing Python over Ruby?

    July 3, 2010 @ 12:54 pm

  2. aidan says:

    Hey Steve,

    I’d say the two main reasons to choose Python over Ruby (and this coming from an ex-Ruby guy) are readability and community.

    Ruby has many ways to implement the same thing, and this means that Ruby written by Joe in San Francisco can look very different to Ruby written by Hiro in Japan (and often does). While this might not seem like a huge barrier, it makes it much harder for the novitiate to understand someone else’s code, particularly the inner workings of a Ruby library. I like that Python has really only one acceptable way for pretty much every code structure, making it much less likely for source code to have an “accent”.

    I’m not sure if it’s a result of this readability (the two seem related in my mind), but I’ve found the Python community to be more helpful than the Ruby one. When asking a newbie question, I get links and answers as opposed to being ignored or told to RTFM with Ruby questions.

    Having said all that, if you know Ruby, sticking with Ruby is no bad thing. Same for PHP. These languages all have their advantages over Python. I just think Python takes it by a nose for a general purpose dynamic language.

    July 5, 2010 @ 10:27 am

RSS feed Comments | TrackBack URI

Write Comment

XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>