On a similarity between C++ and Perl popularity

tsee on 2008-12-18T17:09:34

Today, I read an interesting interview with Bjarne Stroustrup, the father of C++, on DevX from August of this year. It's a good read, so if you're a C++ user, you should have a look. But even if you never touched any C++ code, there's a very interesting bit of information:

On page 6, the interviewer, Danny Kalev, asks Stroustrup:

Is C++ usage really declining, as some biased analysts and journalists have been trying to convince us for years (often not without ulterior motives), or is this complete nonsense?

Does that ring a bell? The "Perl is dead" crap that's been splashing down the gutters of the interweb waste disposal system, anyone? I urge you to read the full answer. Much of it applies to Perl as well. Please note that Stroustrup doesn't simply dismiss the issue. Here's an excerpt from his reply:

[...] C++ use appears to be declining in some areas and appears to be on an upswing in other areas. [...] Most of the popular measures basically measures noise and ought to report their findings in decibel rather than "popularity." Many of the major uses are in infrastructure (telecommunications, banking, embedded systems, etc.) where programmers don't go to conferences or describe their code in public. Many of the most interesting and important C++ applications are not noticed, they are not for sale to the public as programming products, and their implementation language is never mentioned. [...] It's a really big world "out there" and the increase in the number of users of one language does not imply the decrease in the numbers of another. [...] One simple thing that confuses many discussions of language use/popularity is the distinction between relative and absolute measures. For example, I say that C++ use is growing when I see user population grow by 200,000 programmers from 3.1M to 3.3M. However, somebody else may claim that "C++ is dying" because it's "popularity" has dropped from 16 percent to 10 percent of the total number of users. Both claims could be simultaneously true as the number of programmers continues to grow and especially as what is considered to be programming continues to change. [...] Most of the popularity measures seem to measure buzz/noise, which is basically counting mentions on the web. That's potentially very misleading. Ten people learning a scripting language will make much more noise than a thousand full time programmers using C++, especially if the thousand C++ programmers are working on a project crucial to a company—such programmers typically don't post and are often not allowed to. My worry is that such measures may actually measure the number of novices and thus be an indication of a worsening shortage of C++ programmers. Worse, managers and academics may incautiously take such figures seriously (as a measure of quality) and become part of a vicious circle.

I know first hand about large C++ systems that don't produce the slightest bit of publicity for the language they're implemented in. It's what I deal with every day. Dito for large Perl code bases. Stroustrup hits the nail on the head about this issue (and C++). It's exactly what I think about Perl in the same context. There may be an issue with not generating as much noise as others (not enough new blood), but it's by no means an indication of stagnation or decline. People simply use it do what they always did. People also use it to do new stuff. But they don't blather about it all day. They earn their salary and at the end of the day, they go home to their families and spend their spare time on more interesting things than blogging about their favourite new toy language*. You have to realize: This applies to easily more than 95% of all professional programmers.

* That reminds me of something... got to go.


Hand Waving

djberg96 on 2008-12-18T19:32:20

Many of the most interesting and important C++ applications are not noticed, they are not for sale to the public as programming products, and their implementation language is never mentioned.

And he knows this...how?

Re:Hand Waving

Aristotle on 2008-12-18T19:47:37

Because it’s a universal truth of programming, applicable to any language?

Re:Hand Waving

gabor on 2008-12-18T19:57:32

I don't know where does he take that info from but I know about several large and interesting Perl applications written at some of my clients and nobody talks about them in public.

Re:Hand Waving

chromatic on 2008-12-18T20:51:09

Because you can do more in C++ than write a weblog in ten minutes?

I kid, I kid. I talked to Tom Love yesterday (co-creator of Objective-C), and he told me that the Department of Veterans Affairs has a huge system written in MUMPS. There's a huge amount of software no one outside the company or industry ever hears about.

Re:Hand Waving

djberg96 on 2008-12-18T22:47:12

That maybe so, but it doesn't really deal with the question. However, I think the "Is language X dying" is the wrong question. Most languages never really die. Hell, look at COBOL. It'll be around after we're dead and buried I'm sure. So will C++ and Perl, for that matter.

The right question is "Is language X thriving?". In the case of C++ the general vibe I get is that it's stagnating, continuing on in hardcore backend systems that most people never discuss as you say, but not gaining much traction in terms of mindshare among new programmers or programmers switching languages. But really, I'm guessing. And, hey, Rubinius is using C++! And so is Haiku, but nevermind that.

So, how do you know if a language is thriving? Beyond the web hype, there's book sales and new (commercial) 3rd party tools being actively developed for it. You, of course, have access to book sales, and that's a far, far better indicator than Tiobe IMHO. In fact, it would be _awesome_ if O'Reilly would publish those numbers monthly. (Or do you? I've seen a few scattered posts, but nothing regular).

Re:Hand Waving

chromatic on 2008-12-18T23:43:06

Sales numbers tell part of the story, but they're a source of contention even within O'Reilly. They can give a good indicator of growth of interest in a subject area, but I'm skeptical about how much information we can glean about the lessening of interest in a subject area.

You have to measure the age of a book, the total unit sales for a book across its lifetime, and the point in the life cycle of a topic. The former matters because most books have their strongest sales in the first year. After that, physical bookstores tend not to stock them. The relationship has more complications than that, but you get the idea.

The lifetime sales metric matters when comparing topics of differing maturity. The growth rate of unit sales for Ruby books in late 2005 and early 2006 dwarfed the growth rate of Perl, Python, and PHP books in the same period, but I think it's important to compare the lifetime sales of the Pickaxe to the lifetime sales of the Camel, as well as the number of books on the topic. If there's only one book on a topic and that topic gets hugely popular, the sales numbers of that book should reflect it. However, if you only evaluate sales in quarterly windows, you might not notice that a market of ten-thousand customers with eight thousand buyers in one quarter, two thousand in the second quarter, and five hundred in the third quarter is smaller than a market which consistently buys four thousand units per quarter.

I'm not sure that the information we've published publicly goes into sufficient detail to draw the appropriate conclusions. Two factors apply here. First, our Bookscan data tends to reflect only retailers with physical presences. I've heard that that represents about half of the book market. We can guess as to the other half, based on our internal data about online sales, but that does introduce some fuzz. Second, we only license the data from Bookscan, so we can't share raw data.

You're right, though -- it's far better data than TIOBE.