I saw this on Curious Programmer’s Blog:
I wouldn’t get into google (their interviews don’t select for my brand of genius). But that’s fine as I wouldn’t be able to write perl there anyway.
I was trying to think of a few reasons why Google would have chosen Python over Perl as their primary scripting language. A number of the ones I came up with are less relevant than they used to be.
Python integrates better with C++
Boost.Python promises seamless interoperability between the two languages. It has been a while since I’ve been tempted to embed a scripting language in my C++ apps so I’m not sure what the counterpart is in Perl if any.
Back in the day, these were better than the Perl offering. More recently, on Unix at least; with Coro, AnyEvent, Twisted, etc. it’s a wash.
A few years ago, the various Perl Windows implementations were not very high quality. Strawberry Perl has changed all that though. It’s awesome.
Jython et el.
Was Jython around when Google was choosing Python? I guess it was.
Perl (5) doesn’t seem to have escaped it’s VM as well as Python and Ruby. Having said that, the Jythons and JRubys of the world are always second class citizens compared to the original C VM as no-one can be bothered to rewrite all the C extensions.
Easier to avoid making a mess as a secondary language?
Experts in either language can write clean, efficient code. But what about folks who are expert in C++ and Java and use either Perl or Python on the side and only occasionally?
I think such usage for a large system will result in unwieldy code in either language, unless the large system is curated by experts, but for small to medium systems in the absence of experts, python may have the edge.
Even smart folks I know seem to think Perl is lacking in some way in comparison to Python. I haven’t managed to get them to enumerate any reasons though so I figure they are speaking from a position of ignorance. This could have been the case for the folks making the decisions for google too or, more likely, they may have considered some of the other reasons on my list.
I really don’t know why Google seems to have chosen Python over Perl. But his claims regarding anti-Perlism are somewhat amusing. Every developer with whom I have discussed this issue says roughly the same thing: Perl is a write-only language. It’s very difficult to pick up a piece of Perl code, even when it’s your own, and be able to quickly understand the gist of it. The switch to Python is usually accompanied by an increase in productivity simply because of the clean, clear and concise code its syntax encourages. Furthermore, with Python’s sensibility that there should be one – and preferably only one – obvious way to do it, teams working together in Python can quickly become comfortable with shared code in a way that I never saw when I was developing in Perl. Your mileage may vary.