I first heard of Perl when I was in middle school in the early 2000s. It was one of the world’s most versatile programming languages, dubbed the Swiss army knife of the Internet. But compared to its rival Python, Perl has faded from popularity. What happened to the web’s most promising language?

advertisement

advertisement

Perl’s low entry barrier compared to compiled, lower level language alternatives (namely, C) meant that Perl attracted users without a formal CS background (read: script kiddies and beginners who wrote poor code). It also boasted a small group of power users (“hardcore hackers”) who could quickly and flexibly write powerful, dense programs that fueled Perl’s popularity to a new generation of programmers. A central repository (the Comprehensive Perl Archive Network, or CPAN) meant that for every person who wrote code, many more in the Perl community (the Programming Republic of Perl) could employ it. This, along with the witty evangelism by eclectic creator Larry Wall, whose interest in language ensured that Perl led in text parsing, was a formula for success during a time in which lots of text information was spreading over the Internet. As the 21st century approached, many pearls of wisdom were wrought to move and analyze information on the web. Perl did have a learning curve–often meaning that it was the third or fourth language learned by adopters–but it sat at the top of the stack. “In the race to the millennium, it looks like C++ will win, Java will place, and Perl will show,” Wall said in the third State of Perl address in 1999. “Some of you no doubt will wish we could erase those top two lines, but I don’t think you should be unduly concerned. Note that both C++ and Java are systems programming languages. They’re the two sports cars out in front of the race. Meanwhile, Perl is the fastest SUV, coming up in front of all the other SUVs. It’s the best in its class. Of course, we all know Perl is in a class of its own.” Then came the upset. The Perl vs. Python Grudge Match Then Python came along. Compared to Perl’s straight-jacketed scripting, Python was a lopsided affair. It even took after its namesake, Monty Python’s Flying Circus. Fittingly, most of Wall’s early references to Python were lighthearted jokes at its expense.

advertisement

advertisement

advertisement

advertisement

advertisement

Ironically, much in the same way that Perl jested at other languages, Perl now finds itself at the receiving end. What’s wrong with Perl, from my experience? Perl’s eventual problem is that if the Perl community cannot attract beginner users like Python successfully has, it runs the risk of become like Children of Men, dwindling away to a standstill; vast repositories of hieroglyphic code looming in sections of the Internet and in data center partitions like the halls of the Mines of Moria. (Awe-inspiring and historical? Yes. Lively? No.) Perl 6 has been an ongoing development since 2000. Yet after 14 years it is not officially done, making it the equivalent of Chinese Democracy for Guns N’ Roses. In Larry Wall’s words: “We’re not trying to make Perl a better language than C++, or Python, or Java, or JavaScript. We’re trying to make Perl a better language than Perl. That’s all.” Perl may be on the same self-inflicted path to perfection as Axl Rose, underestimating not others but itself. “All” might still be too much. Absent a game-changing Perl release (which still could be “too little, too late”) people who learn to program in Python have no need to switch if Python can fulfill their needs, even if it is widely regarded as second or third best in some areas. The fact that you have to import a library, or put up with some extra syntax, is significantly easier than the transactional cost of learning a new language and switching to it. So over time, Python’s audience stays young through its gateway strategy that van Rossum himself pioneered, Computer Programming for Everybody. (This effort has been a complete success. For example, at MIT Python replaced Scheme as the first language of instruction for all incoming freshman, in the mid-2000s.) Python Plows Forward Python continues to gain footholds one by one in areas of interest, such as visualization (where Python still lags behind other language graphics, like Matlab, Mathematica, or the recent d3.js), website creation (the Django framework is now a mainstream choice), scientific computing (including NumPy/SciPy), parallel programming (mpi4py with CUDA), machine learning, and natural language processing (scikit-learn and NLTK)… and the list continues. While none of these efforts are centrally coordinated by van Rossum himself, a continually expanding user base, and getting to CS students first before other languages (such as even Java or C), increases the odds that collaborations in disciplines will emerge to build a Python library for themselves, in the same open source spirit that made Perl a success in the 1990s. As for me? I’m open to returning to Perl if it can offer me a significantly different experience from Python (but “being frustrating” doesn’t count!). Perhaps Perl 6 will be that release. However, in the interim, I have heeded the advice of many others with a similar dilemma on the web. I’ll just wait and C.