by ncmncm · 5y ago · 0 comments
All this is an argument for "rule of zero": write your classes in a way that the default copy and move constructors and destructor do the right thing. That gives the compiler latitude to do the right thing in places that it otherwise could not.
Some code obliged to do extra work will be able to do less of it when compiled with a compiler that knows C++23, provided you have followed rule of zero.
I understand why the committee was unable to get destructive moves into the standard, but I do think that is one thing Rust got right that I really wish C++ had.
Rust cannot abandon backward compatibility with itself, so will increasingly be stuck with old choices, like C++, and will soon be fully as complex and infuriating. But it will, like C++, remain usually more useful than alternatives.
People say A few hundred dollars is nothing to a professional software engineer, but few C++ developers actually buy it, so the legalese they consult is often not the letter of the law but a proxy like cplusplus.com, replete with the occasional error.
I bet many ISO committee members aren't able to answer "what are the semantics of this code" with looking into the standard.
And there lies the problem, it is not possible as contractor jumping into a foreign code base to be certain of everything that is going on there.
Now imagine the task of upgrading a codebase to a newer compiler and language version, while assuring everything keeps working the same way.
But cppreference.com is generally easier to understand.
Care to explain the scare quotes? ISO charge 198CHF, [0] which is $210 USD. ANSI charge $250. [1]
> The Final Draft International Standard online is guaranteed to differ from the formal Standard only on the title page.
Do you have a source for that? From what I can tell the differences are expected to be minor, but that's as far as the guarantee goes.
If what you say is true, why would anyone ever both paying for the completed document, and why would ISO expect to derive profit from paywalling it?
> cppreference.com is generally easier to understand
Sure, I'm not saying it's a worthless website, far from it, but errors can and do creep in.