Perl: What is it with Python users?
Perl: What is it with Python users? an essay by Aaron Sherman
I'm a C guy at heart (no, not C++, you whipersnappers), but I've been programming in Perl on-and-off for the last 15 years, and I've grown fairly fond of it. I'm very much aware of its limitations, of course, but I like the language, and find it trivial to do what I want.
In the last 10 years, a new language has been slowly gaining a groundswell of popularity in similar niches: Python. Now, I have several reasons to like Python. First, it's named after one of the most brilliant comedy teams of all time. Second, it's a very clever language with some syntactic, grammatical, and semantic constructs that I just have to love.
However, there has been a blot on the relationship between Python and Perl for years, and one which I have increasing trouble understanding; Python seems to be a hotbed of developers who feel the need to announce a "position" on programming languages, and defend it strongly. Over time, this has lead to any online or real-life conversation that I've had with Python users and developers ending with either, "Perl sucks for the following reasons," or, "Python is better than Perl for the following reasons."
A programming language is exactly as useful as it demonstrates itself to be. Speculation about what features make good or bad programming languages can be useful when evaluating untried languages, but when it comes to selecting a language for a given project, clearly the most important signpost is simply: how has this language worked for the people who have used it.
As an example, it is widely known (mostly due to Paul Graham's essay, Carl de Marcken: Inside Orbitz) that "ITA Software is slowly replacing the [Airline] industry's hardware and software with Common Lisp code running on Linux PCs." Common Lisp is clearly a powerful language if it allows developers to replace legacy systems quickly and cheaply enough that the risk/reward is beneficial to the airlines. And yet, classically, Lisp is a language which is characterized as difficult to understand and maintain. Larry Wall, author of Perl, has referred to Lisp as having, "all the visual appeal of oatmeal with fingernail clippings mixed in."  And yet, Perl 6 derives heavily from concepts that come from Lisp and the rest of the functional programming world. Why is that? Because Larry and most of the Perl community are well aware of the distinctions between personal preference and powerful programming paradigms.
The Tao of Python is that of simplicity and uniformity. In Python's view, there is one correct way to accomplish any given task, and the language aspires to enforce this view insofar as is practical. Unfortunately, this view—while quite useful in may ways—seems to foster the aforementioned language fanaticism which is so divisive among developers of similar high-level languages.
Especially harsh are the Python community's responses to Perl. Primarily, this is a result of the fact that Perl is fundamentally an inclusive language, holding that "There Is More Than One Way To Do It." ("TIMTOWTDI" or "TMTOWTDI") This view is in stark contrast to Python's exclusive approach, and many users see these polar extremes as an invitation to "pick sides". However, if one follows the history of both languages, it is readily obvious that both approaches have borne fruit, and for divergent reasons. Perl was able to bring together the diverse needs of the systems administration and Web development scripting worlds; while Python was able to capitalize on the growing "glueware" role in which large applications have critical components written in rapid-development, high-level languages. Red Hat has been a leader in such uses of Python, using it to write their installer and many system configuration programs.
Perl 6 as arbitrator?
Perl 6 may help to soften these animosities. Certainly the ability to use Perl or any other Parrot-native language from Python or visa-versa will give Python developers more opportunity to see the value in their fellow high level languages. Also helpful will be the fact that Perl 6 clearly borrows several concepts from Python among many other languages.
Most helpful, however, is the fact that Perl 6 allows full control over the language from within itself. This allows for far more strictness to be applied to the language when and if a developer should want it. Those who prefer this model of programming will no longer have to do without.
Wishful thinking? Perhaps, but as a long-time Perl user and contributor, I can only hope to stop seeing flames and trolls directed at the Perl community from the otherwise, quite productive and capable community of Python programmers.
Here is a collection of links which demonstrates some of the history of such interactions:
- An article on Slashdot about Haskell and Perl 6 immediately becomes a forum for promoting Python. This has become a pronounced trend in any online forum or weblog which includes discussion of Perl.
- A Perl vs. Python page
- It should be noted that much of the information about Perl on this page is flat-out wrong. I don't know what programming language they've been using, but whatever it is, I'd agree that it sucks compared to Python or Perl.
On the other hand...
Here are some examples of balanced Python advocates who take the time to understand Perl:
- A Perl/Python equivalency list which outlines techniques in both languages.
- A balanced pro-vs-con of the first time Python user who enjoys both languages.