How Viable is Perl?
A few months ago, John D. Cook wrote about the viability of unpopular programming languages.
His story starts with a comment about Perl 6, to which someone replied, “Does anyone actually use Perl 6?” (or words to that effect).
“My first thought,” he writes, “was, I bet more people use Perl 6 than Haskell, and it’s well known that people use Haskell.”
What is the relationship between popularity and viability?
Does a language need to be popular to be viable?
Cook compares the popularity of Perl to Haskell and several other languages:
- “Common Lisp has been around since 1982, and was standardizing a language that had been in development since 1958.”
- “Erlang has been around since 1986.”
- “There is not a huge community devoted specifically to F#, but it shares tooling and libraries with C#…”
Popularity provides many hands to work on projects and many eyes to address issues with the platform. However, both Lisp and Erlang, he says, “have many of the benefits of popularity…accumulated over time” (emphasis mine). And all of these languages would be “safer bets for a production software project than several more popular languages.”
As it is with art and entertainment, a long-lived cult-classic technology can be more viable than one that is popular in the moment.
He used the TIOBE index for his stats. I prefer the PYPL index, which uses Google Trends to track the number of searches on the term “<language> tutorial.” They explain in their FAQ:
“C programming” is used much more than “PHP programming,” because PHP does not need the qualifier. Tutorial is a word used frequently by developers learning any new language: it makes a good leading indicator. What is a “python tutorial,” if not a tutorial on the programming language?
So this methodology should measure not how many people are using a given language, but how many are learning it.
Common Lisp, Erlang, and F# are missing from PYPL, because none of them is popular enough. Perl and Haskell do appear on the index, both at <1% and sinking.
However, PYPL (like TIOBE) measures popularity based on share of searches, not the volume of them. So if language A becomes bigger because more people are searching for language tutorials in general, language B’s graph line descends, even if its overall volume continues to increase.
How popular is Perl?
When I’m doing research, I’m usually more interested in the absolute volume. Therefore, I took to Google Trends myself. I downloaded data for a number of programming languages (number of searches per week), smoothed the raw search counts with a Gaussian weighting function, and plotted them on a logarithmic y-axis. The languages I looked up included all the ones in John D. Cook’s article, plus Go, Perl 6, and Dart. I also included the variation “GoLang tutorial” and added it to “Go tutorial.”
And here’s what I saw:
I also noticed some other interesting phenomena:
- Perl is indeed more popular than Haskell, Lisp, Erlang, etc. Or at least more people are looking up Perl tutorials than tutorials on those other languages.
- No one seems to be searching for “Perl 6 tutorial.” Literally, zero searches recorded as far as I can determine. Google must be filtering them out somehow or lumping them together with “Perl tutorial,” even though the two searches return distinctly different results. So Google does seem to know the difference, but Google Trends is still not showing any searches for P6 tutorials, and I don’t believe that no one is searching for them.
- Dart is still a minor player. There are some searches for “Dart tutorial,” but there were so few that I didn’t even include it in the graph.
- There was a noticeable spike in searches for “Go tutorial” for about a month during July 2016. GopherCon 2016 was held July 11th through the 13th. Probably not a mere coincidence.
- There were quite a few searches for “Go tutorial” back in 2004, years before the language was even invented. I’m not sure what those searches were pulling up back then, but I’m pretty sure current searches are talking about the programming language. (This also belies the PYPL’s idea that “What is a ‘go tutorial’ if not a tutorial on the Go programming language?”)
Which of these are viable languages?
I concur with John D. Cook on Haskell, Lisp, Erlang, and F#.
GoLang is a viable language, being almost a decade old now, supported by Google, and increasingly used in production projects. It seems to me its growing popularity is a symptom (not a cause) of its viability.
The most interesting manifestation of the popularity-viability conundrum, however, is Dart. Despite Randal Schwartz’s enthusiasm for Dart, the language is still seeking its niche. It’s been around for 7 years, but it has not yet reached the adoption chasm, much less crossed it. It may have found a “killer app” in Flutter (which is a truly cool framework for mobile apps, and Randal Schwartz’s recent lightning talk on Flutter frankly didn’t do it justice). But whether Dart will make it big is still yet to be seen.
Even so, despite its lack of popularity and its newness, Dart is a viable platform for production projects.
Yes, people actually do use Dart for production projects, mostly in web and mobile development.
If Dart is viable, then how much more so Perl?
This post originally appeared on The Perl Shop blog as “How Viable is Perl?”