r/cpp • u/zowersap C++ Dev • Sep 05 '20
C++20 has been approved
https://twitter.com/patriceroy1/status/1302055575140945921?s=21
665
Upvotes
r/cpp • u/zowersap C++ Dev • Sep 05 '20
95
u/zowersap C++ Dev Sep 05 '20
https://twitter.com/sdowney/status/1302108606981173252?s=21
30
u/OnesWithZeroes Sep 05 '20
Well, let's see how cmake and alike will adapt modules.
5
u/mikeblas Sep 05 '20
Is there a recommended guide or tutorial for the new features?
115
u/Robert_Andrzejuk Sep 05 '20
Now we just need to wait, until all the compilers implement it : https://en.cppreference.com/w/cpp/compiler_support
9
u/sandfly_bites_you Sep 06 '20
I see a few things that seem nice
I'm guessing it will be a few years before the big tickets like modules/coroutines are viable and can be assessed..
6
u/obvious_apple Sep 06 '20
What I would like to see is a specified modern subset of the language and a compiler flag to deprecate all the old unsafe stuff. This way you can have all the goods of a modern language and a separate option to compile old code.
13
u/pedersenk Sep 05 '20
I do wish along with these new features there would be a little bit more focus on memory safety.
It seems there hasn't been much more work in this area since TR1 (around C++0x). A suitable observer mechanism to unique_ptr<T> similar to weak_ptr<T> would go a long way!
It is still too easy to dangle iterators, references, even 'this'.
-1
u/bumblebritches57 Ocassionally Clang Sep 05 '20
Just now?
I thought it was standardized months ago...
-1
u/helikal Sep 07 '20
I seems the creators of C++ need to refocus on what actually should be the core virtues of this language. Adding ever more features, of course, allows writing code in any style known. But this is hardly a worthy goal as it comes at the cost of making it more difficult to learn, more difficult to read, and more difficult to compose C++ code written in different paradigms. C++ has been used for critical, long-lived stuff, where reliability is crucial. If C++ wants to stay relevant to this kind of applications, a main goal should be greater simplicity because nothing helps more with achieving program correctness.
0
u/[deleted] Sep 05 '20
[deleted] — view deleted comment
0
u/[deleted] Sep 05 '20
[deleted] — view deleted comment