It was 1992.
C++ is old language, however the first version of C++ standard only appeared in 1998.
Before it happened, the quality of the compilers was mediocre. Early in my career (but much later than 1992) I have used VC++ 5 and 6, they weren’t good. They were good enough C-with-classes compilers, but try slightly more complex C++ and they just crashed.
The standard library wasn’t there either, instead there were multiple incompatible STL implementations.
void f() {
Vector<int> var1;
}I think c a novice seem much more likely to rely on undefined behavior and have an accidentally working program that leaks memory, fails to check the return value of malloc, close files etc?
That is, one can be sort of productive and "correct" in naive c++ - in c that's not really possible (well, one can be "productive" but correct is less likely?).
I can't be bothered to check the implementation now, but the allocated size must be stored somewhere. My first thought of inferring the capacity as the smallest power of two greater than the used size doesn't work as the vector size can shrink without affecting capacity.
If it's too hard to find good people or sift out bad code, even a technically good language is not helping you with your real task.
I'm not claiming to be highly skilled with C++ (or any language for that matter), but I've spent several years as an undergraduate TA for the year-long intro to programming series which was taught in C++. I read the textbook over several times, helped create homeworks, exams and study material, and not once have I heard of RAII or naked/smart pointers. In fact, I've never heard the word 'correctness' in reference to the idea of const variables. Is my education faulty, or is it disingenuous to call these ideas 'most basic'?
I graduated from one of the better engineering schools in my West-coast state.
Not parent commenter either, but by far the most common answer is: "the sort of C++ dev who is happy with maintaining incredibly clunky codebases that are old enough to drink alcohol in the U.S. If you're in a well-defined, niche sector like gaming, embedded, low-latency programming etc. the code won't quite be old enough to drink, but it will still be really, really clunky, and nowhere near a "modern" standard like C++17.
Maybe you can find some good C++ devs in CAML, lisp, scala, rust comminities, but these people probably would not turn back to C++ without a strong reason.
I understand Linus's argument that in large collaborative C++ projects driven by volunteers, you can easily end up with messed up code base littered with stupid mistakes. C is slightly easier to understand and deal with - relatively. Also note even fewer people actually knows what C++ features you can use it on bare metal or kernel code.
On a fun side story, Windows NT team initially had huge debates on using C++. Dave Cutler was firmly against using C++ to build OS if I remember correctly but the graphics group decided to be hip and modern and do everything in C++. After long delays and frustration graphics group had to revert to C.