4 ms·
Many people don't realize just how conservative C++ is (the OP only briefly mentions this). The committee not only avoids breaking existing source code, but eve
by gurkendoktor 7y ago
Many people don't realize just how conservative C++ is (the OP only briefly mentions this). The committee not only avoids breaking existing source code, but even binaries, although binary compatibility is not defined in the standard at all.
C++ 11, 14, 17, 20, and 23 are all binary compatible (modulo some possible oversights). There are many quality-of-life improvements that got voted out because then a binary compiled in C++11 wouldn't be compatible with one built in C++23 anymore.
As a simple example ([1] has many more): the only reason we have both std::scoped_lock and std::lock_guard is because changing the definition of the latter would have required re-compilation of existing code, so a new class had to be introduced.
ABI stability even overrides performance in committee decisions (see the std::regex example, but I also heard it affects the footprint of unique_ptr - edit: found it [2]).
tl;dr breaking source code compatibility seems way off if implementors don't even dare to break binary compatibility.
[1] http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p2028r0.pdf http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p202...
- snovv_crash 7y agoAt this point they should just standardize the ABI. It would solve so many headaches, and allow C++ to be used as a proper systems language.
- pjmlp 7y agoIn Windows we at least have COM and now UWP.