My two cents on Ruby vs Python comparisons

Update: I changed the article a bit because after reading through it I realised that for someone who moans about uninformed comparisons, I definitely make too many uninformed comparisons myself. Initially this was just going to be a link to Ian Bicking’s blog with maybe my own conclusion, but then I just started japping on and on. I also added a link to TurboGears.

I’ve seen a lot of (usually biased or at least uninformed) Python vs Ruby comparisons on the web lately. Some of them were even titled something along the lines of “Ruby on Rails vs Python”. uhum.. Rails is a framework and Python is a language.. I don’t even bother following links like that. Python nowadays has Django, anyway, which looks very interesting and is probably better for comparisons with Rails, but from what I’ve heard they aren’t even that alike. (Update: TurboGears also looks very interesting. I like the fact that it doesn’t suffer from “not invented here” syndrome.)

Rails was really the first thing that put Ruby onto the map. I’m pretty sure the amount of Ruby developers increased by an order of magnitude since the release of Rails. If you don’t believe me then make a list of apps written in Ruby that doesn’t use Rails and then make a list of apps written in Python. If you still don’t believe me, check wikipedia. Often I’ve used apps for a long time and then only later realized that it was written in something other than C. Maybe this is because I’m an Ubuntu Linux and Gnome user (they do seem to favour it), but I’ve also seen quite a few things like shell utilities written in it (things that used to typically be written in Perl). Python also seems to be embedded as a scripting language into apps more often. I know this is probably irrelevant when comparing languages, but more projects mean more programmers mean more libraries, etc.

More programmers also mean more bloggers. But then why do I see so many more pro-ruby opinions on the net? Are Ruby supporters just generally Zealots while Python programmers shut up and get on with writing code, or is Ruby really better than Python? Is it all just a stupid waste of time like the editor wars? This bugged me for a while and I started thinking that maybe I’m missing out on something.

So I thought I would learn Ruby and then use it if it is better or write a big informed comparison between the two. I set out to learn Ruby and quickly became bored and discouraged the moment I realised that I don’t like the syntax. So much for me adding anything of value to the discussion. (I also think that it is near impossible to learn a language properly unless you are actually using it)

Ruby people usually quickly mention closures. I was pretty sure that I could retaliate with “well… Python has x, y and z language features that Ruby doesn’t!”, so I started searching for just that and then I found this. I think it is a really good comparison by someone who’s obviously a lot smarter and less biased than me. It basically leaves both languages tied.

So.. I have decided to conclude that it boils down to things like personal taste, what you’re used to, which language you learned first, what you’re comfortable with, etc. I discovered sites like lesscode.org and I’m starting to see a bigger picture: Exposure to dynamic languages and alternative platforms in general is probably a good thing. The Java, .NET, etc. guys that discover Ruby and Python and then start to read up about it and maybe try it out is likely to discover both languages and then compare them for themselves. In other words: exposure to one will soften them up for both. Besides.. discussing whether or not I like Ruby is distracting from more important things like “How much I hate almost all other languages” ;) If I get to choose between using Ruby or anything other than Python, I would definitely choose Ruby.

At least until the next new (better) language comes along.

Leave a Response

(will not be published)
(optional)
Remember Me