I come to defend C++ not to bury it.
Quite frankly I’m tired of these complaints. Fact is that every language comes with more than a syntax. It also includes:-
- a “programming model”
- idioms and,
- best-practices,
You have to learn all three of these as well as syntax to use the language effectively. If you don’t know what these are in your chosen language, you shouldn’t be asking people to pay you to program in it.
This article - and many others like it - is just a whinge by an author who is insufficiently versed in these elements to survive in a commercial environment using C++. Poor craftspeople blame their tools, good ones don’t.
Complaining about pointers, references, inheritence, etc is just a sign that you don’t understand the language enough to be commercially productive.
If you know the C++ programming model, the idioms and the practices you won’t have any trouble producing trouble free code as a matter of routine. I know (and have hired) several people who have a proven track record over many years now of producing upwards of 500-1000 lines of working, tested code into production. [YES - I’ve got the stats, and no, you can’t have their names].
If you don’t know these things you’ll be reinventing the wheel and making it up as you go along. That is very definitely the road to blowing your leg off.
Ok - got that out of the way.
With C++, there’s one more thing. Are you talking about “windows” C++ (where the Windows API’s and libraries are involved) or “unix” C++ (where the Unix/Posix environment is used). Sometimes the terms “server-side” and “client-side” are used, but they essentially refer to the same idea.
Each has a different set of idioms and best-practices, and anyone who knows one will find it difficult to operate in the other environment. If you doubt this, talk to a recruiter or better still a good technical lead who hires developers. It is common for such people to make this distinction and refuse to consider a candidate with a “client side” backgroud for a “server side” position (and vice versa). I know that’s my practice, and I know it’s also
a widespread practice in the market generally.
In my experience a server-side guy who’s read Coplien (and the rest of them), and who knows what the hiding rule is, is someone worth hiring. A client-side guy who’s read Petzold (and the rest of them) is worth it for the client side. Anyone without these knowledge sets is a very dubious hire.
Bottom line. You either know the language or you don’t. If you know it, you’re a hire. If not, you write articles like this.
C++ is a fine, very fast and efficient language that is perfectly safe when used properly by a knowledgable and skilled developer.