C++ still cannot compete with proper high level languages in this area.
C++ is precisely useful because it's a better C: it has a C-like subset, and works directly with C data structures and function call interfaces. Plus it has features to do that kind of programming in a safer, more managed way.
I would absolutely not use C++ for anything that isn't in the area of "this should be ideally written in C, but that would bring in undue difficulties, risks and time".
The more C++ moves away from its focus of being a language for writing low-levelish systems middleware, the more it loses its relevance.
> Also, you have a ref counted pointer thread safe pointer!
Had those in 1997 using draft ISO C++, thanks.
Re:C++11 FAQ
by MichaelMoser123 on Saturday January 28, 2017 @09:11PM
(#13511369)
just be careful with those ref counted pointers: shared_ptr/weak_ptr introduce a lot of atomic variable access. if you use them from a single thread then that's pure overhead.
Re:C++11 FAQ
by banachtarski on Tuesday January 31, 2017 @02:54AM
(#13528611)
Yes, of course. A big chunk of my time at various previous companies was removing usage of such things when not necessary. It's also not "a lot" of atomic variable access but you do need a strong fence to provide the correct semantics (so it is some). To what degree "a lot" or "some" is depends obviously on what you're doing.
I have a much easier time holding the entire picture together but others are correct in saying you have to throw away old conceptions and ideas of the language. I personally have thrown away the way I think about C entirely (at least when I code in modern C++).