3 ms·
I do not fully agree with the premise that C programmers don't know what's best for them and need to be educated to switch to C++. I do agree that C++(14++) iso
by sovande 9y ago
I do not fully agree with the premise that C programmers don't know what's best for them and need to be educated to switch to C++. I do agree that C++(14++) isolated is a better programming language in many ways compared to C. The problem is that a programming language seldom is used isolated, but is part of a toolchain or is used in an environment with other technologies.
In this situation, C is a much better choice because most other languages have nice interoperability with C, but seldom, if ever, with C++. For example, as an iOS developer I can use C and C-libraries very easy with Swift, while inter opt with C++ is not possible at all and probably never will.
The main thing keeping me away from C++ is that it does not have a stable common ABI. This makes it very nearly impossible to use C++ to create and distribute a shared library. I even believe Google developers internally are prohibited from creating C++ libraries for this reason. So I'm sticking with C for low level stuff. It's a perfect glue language and fast. For higher level stuff, why use C++, when you can use Swift, Java, Haskell etc etc?