Quote:
2. C++ as a LANGUAGE is not noticeably safer than C. Using the correct C++ STL classes such as std::string is quite clearly safer than using char arrays for strings. But if someone wrote a sufficiently comprehensive C string library [that is not based directly on char arrays, but uses another way to describe string, e.g. a
Code:
struct { char *s; int len };
then it could be made just as safe as C++ std::string. And I'd be very surprised if such a string library was not already in existence.
And I find it a real shame that no such library has been incorporated into the standard yet, although there is a proposal for one such library.
Quote:
4. C is still a language used for many things, including most drivers and kernel code in most of the current OS's. Being able to use a C compiler to compile existing code that does not compile in C++ [and I'm not talking about places where code is not ok C++ because it does tricky or dodgy stuff, but for example using "new", "operator", "class", "private", etc as identifier names in the code]. Modifying code that has a million lines or more in it, to comply with C++ compiler for the ONLY reason that someone decided that C is no longer a valid language is not a good business strategy.
Please note that I never suggest that ALL code should be recompiled with C++. There a reason why backwards compatibility exists. Legacy code should be compiled with legacy support.