ISO/IEC 14882:2011, or '''C++ 11', is the latest published standard specification of C++. The update specification includes:
DKF: Tcl is not written in C++, but rather in C. This is not about to change, as it remains relatively difficult to do extremely portable ABIs in C++ due to the exact details of how compilers convert source code into object code; the tendency with C++ is to spread implementation details across class boundaries at the ABI level, which is a bit faster but also far more entangling. As such, Tcl sticks with C (and in fact a very codified and restricted type of C at that); in engineering terms, we're very conservative.
What we would like to be able to do, but can't at the moment, is unequivocally recommend a library for people who do want to mix modern Tcl and modern C++…
willdye If you're searching for references to C++, then you might want to also search for strings such as "cpp" or "cplusplus". The "++" characters are problematic in certain situations, so the name "C++" has many synonyms.
AMG: Aside from interoperability with already-existing C++ packages, what compelling applications (uses) for the C++ language are there?
It seems to me that most of C++ seems to be syntax sugar for stuff already present in C, for example: const (#define, enum), iostreams (printf), templates (#define), classes (struct), exceptions (return codes, errno, longjmp), virtual functions (function pointers), weird casting (straightforward casting), bool (int), // (/*...*/), references (pointers), new/delete (malloc/free), and so on.
Any actual innovation in C++? What can be done in C++ that can't be done in C?
How about function overloading and defaulted arguments? In C, I'd just embed the argument type signature into the function name, such as is done in OpenGL.
Operator overloading? I just make functions with names describing the operation being performed, e.g. "add".
Namespaces? Prefix the function or variable name, and now no one can do "using namespace" in a header file. Or use static for file scoping.
Speaking of static, what about static local variables with non-constant initializers? C++ allows this, but it has to implement it using guard flag variables that get checked all the time. The same can be done explicitly in C, but the fact that the programmer has to put them there makes him/her aware of their existence, so they're likely to look for a more efficient approach, not to mention do things in a thread-safe manner.
Or global variables with non-constant initializers? Like the above case, now the programmer has lost control over the order of initialization. Having things be automatic is nice when it works, but controlling the order of initialization strikes me as terribly important.
And so forth... Basically, I just get less and less comfortable with C++ as time goes on, the more I find that C already had the answers in a way that's simpler and more portable.
C's incomplete types, for example, seem to be more effective at data hiding than C++'s protected and private members, which become part of the ABI despite the compiler asking you to not use them (at least, not until you do "#define private public").