I just learned that one of my favorite magazines, C/C++ User’s Journal, has ceased publications. CUJ was an institution among C++ programmers, edited by the leading lights of C++ and filled with meaty technical articles. I’ve been a subscriber for a few years, and I keep a stack of issues by my desk, slowly working through them from cover to cover during breaks in my work. I’ll be sad to finally make my way to the end of that stack. I’ve seen few publications, online or off, which had such consistent high standards of material.
In the more excitable sectors of the geek community this event has sparked off the manditory annual speculations about C++’s imminent demise. I always get a chuckle out of these forecasts of doom (or deliverance, depending on your point of view), because they never fail to show up the shocking insularity of developers. Most programmers have no concept of the full scale of the industry they inhabit. Have you ever seen those satirical maps entitiled “A [city]ers View of the World”? The ones where the the city named in the map’s title is bloated to fill half of the map, dwarving nearby states, and the rest of the world is represented as tiny islands on the horizon? That’s the typical developer’s view from within her own market segment.
Pop quiz: what’s the most popular type of microprocessor on the market? Nope, it’s not an Intel Cellery or Indublium or whatever they are calling them these days. By far the top-selling CPUs in the world are the 8-bit and even 4-bit microprocessors which power embedded devices. The embedded software market is huge, but most people don’t even think about it when they think about software. When developers see Java or C# or VB.Net or Python or what-have-you eclipsing older languages, they are looking only at the relatively small consumer shrink-wrap industry, or at “enterprise” software.
Let me give you a dose of perspective. The system I am working on right now has 128 kilobytes of RAM. Not megabytes, kilobytes. It runs at 12.5 Mhz. And it’s performance must be absolutely deterministic or air traffic controllers will not see flight-path deviations in time to warn the pilots. In a system like this there are only a few viable choices of language: assembly, C, C++, and maybe ADA. Java, even the “embedded” subset of it, simply is not an option. Of the above choices, only one language facilitates the use of modern metaprogramming techniques and high-level abstractions while still giving the coder iron-fisted control over every aspect of resource usage, and that language is C++.
Not to mention that C++ is still one of the most saught-after skills when hiring IT workers.
To paraphrase Mark Twain, rumors of C++’s demise are highly exaggerated. Which is as it should be. C++ is a hard language, with a lot of warts and limitations. But for it’s intended purpose – to be “a better C than C” – nothing else comes close.