4 ms·
You are missing the point. Almost all of this has to do with the binary compatibility of the std library, not the core language. Things like unordered_map/map
by beached_whale 7y ago
You are missing the point. Almost all of this has to do with the binary compatibility of the std library, not the core language. Things like unordered_map/map cannot be improved because the binaries would not longer be compatible. lock_guard could not go from one mutex to one or more because it would have a different name in the symbol table for some compilers, so we get a new scoped_lock that adds another name to do the same thing. push_back on vector cannot return a reference as does emplace_back for similar reasons too. All of those would leave the source code compatible, but break linking, often silently.
These are some of the ones off the top of my head, there are more. So the fix in these cases is another name, and that has the problem of making the language needlessly more complicated and harder to learn.