2 ms·
the way to get the masses of C programmers to move to objects was to make the move transparent: to allow them to compile their C code unchanged under C++ Excep
by neilc 18y ago
the way to get the masses of C programmers to move to objects was to make the move transparent: to allow them to compile their C code unchanged under C++
Except that that is not really true: it is very rare that you can take a non-trivial C program, replace 'cc' with 'c++, and have it "just work".
- wheels 18y agoYou don't have to; C++ can work just fine with object files using C name mangling, so it's no problem to mix C and C++ in the same project even if the source files are compiled with different compilers.
- neilc 18y agoSure, although that's not the C++ <=> C compatibility story that was originally intended, AFAIK. Calling back and forth between C++ and C isn't entirely trivial, either (exceptions, longjmp, etc.)