Everybody Loves Python
These days, it seems like Python is the darling of high-level programming. People build MMOG servers with it, big companies build web app frameworks with it and start research projects to make it go faster, popular webcomic writers extol its virtues, major Linux distributions include it in their base package set, and its geek-tacular Monty Python references charm the pants off of every former Perl scripter on the interbutts.
If you perceive a slight edge to my voice at this point, it’s not your imagination. Though I recognize Python’s wild popularity, I respectfully disagree with certain aspects of its implementation. As such, when I started looking around for a new and hopefully useful language to learn, I chose Ruby instead. Most of my friends have indicated to me, in no uncertain terms, that they think I have made a terrible mistake. After working with Ruby for some time, although I’m certainly not ready to move away from it, I begin to see where they’re coming from.
Ruby, for better or worse (actually just worse), is something of a second-class citizen in relation to Python. There are a number of logical and well-established explanations for this: Ruby’s development lags Python by a few years due to its later introduction date; Ruby’s documentation is often difficult to locate and navigate; Ruby is just plain slower than Python for many non-trivial tasks (though 1.9 improves on this); compiling native extensions for Ruby on Windows is practically guaranteed not to work; and until very recently, Ruby didn’t have built-in support for Unicode strings, which is kind of important if you’re pushing for a global user base. Even in those areas where Ruby is improving, it’s turning out that Python is too entrenched already for those improvements to make a difference. Python came first, and there ain’t room in this town for another language that has basically the same features.
At this point you might be asking what’s so bad about Python that I would instead voluntarily use a language I just described a minute ago as a “second-class citizen”. One reason is my personal belief that, conceptually, Ruby is a better (albeit less mature) language than Python. Another reason is the syntax, and I will defend to the death my opinion that Python’s use of the Off-Side Rule is unbelievably boneheaded and makes code ten times harder to scan due to the complete lack of block terminators (not to mention the ease with which Python code can be irretrievably mangled if anything so much as sneezes on all your leading spaces). The really annoying thing about this is that the Off-Side Rule is not a required language feature to accomplish any of the cool stuff that Python can do. It’s just an arbitrary limitation with no solid rationale behind it.
Of course, at the end of the day, no matter how much I personally dislike the way Python does things, it’s still the more popular language. And given Ruby’s various failings, I’m not exactly surprised. For now, I guess I’ll just keep tinkering around with my little second-class language, and hope it eventually develops some of that secret sauce that makes everybody love Python.