I just read with interest this piece from News.com on the future of C++, and I think I must have missed something. Presuming that quotes were not taken out of context – which is always a possibility – Bjarne Stroustrup, the creator of C++, is making a two part assertion, part of which I agree with and part of which I don’t.
The first part of his contention is that Java and .NET are suffering from something of a backlash. This, with some reservations and qualifications, I agree with. I’ve addressed this, at least from the Java perspective, before. The second part of his assertion, and what I’m dramatically less clear on, is that developers reacting against either one of the modern, objected oriented, garbage collecting languages are heading back to C++.
C++ advocates – and I know there’s at least 1 or 2 likely to read this (that means you, Christopher 😉 – hold the flames. I am not, repeat not, saying that C++ does not have a role to play, because it does. For many purposes, C++ is an ideal choice, maybe the only choice; I agree with Dewitt on that score.
But in my experience, developers abandoning (or refusing to learn in the first place) Java or C# are doing so primarily for reasons around complexity and productivity. They want to get things done as quickly and simply as possible. More often than not, this means the P from LAMP; Perl, Python or PHP. Maybe even Ruby. But not C++.
C++ the language has many virtues, but simple and quick are not typically counted among them. Perhaps it’s that Stroustrup is seeing a backlash for reasons other than complexity and productivity, in which case I’d love to know drivers he’s observed. But without more specifics, I can’t see C++ being a beneficiary of a mass move away from either Java or C#.
Either way, however, I do agree with my colleague’s quote in the piece: C++ has a very definite role within the enterprise alongside both Java and C#, as well as a number of scripting language choices. Different tools for different jobs; let’s all say it together.