Open Menu dzosoft
Close Menu dzosoft




Publish perfectly-optimized content in 1-click


C++ Pandemic Edition

February 16, 2023


C++ Pandemic Edition
The Work on the C++ 23 standard has been completed and this new version is called Pandemic Edition,
Herb Sutter, secretary of ISO's C++ language standardization committee, announced on Monday that work on the new C++ 23 standard was finalized at the committee's last meeting in Issaquah, Washington, USA. United. It is now time for the production of the final document which will be sent to the international approval vote (Draft International Standard, or DIS) and the final editorial work, to be published later in 2023. This version introduces many new features, but some of 'among them are things you won't use so often. There were also several bugfixes
In a post on his personal site on Monday, Sutter said the main theme of C++23 is "Completing C++20", and some of the highlights include the "std" module, "if consteval", parameters explicit "this", simplification of implicit move, improvements for Unicode support, etc., and fixed lifetime of temporaries in "range-for" loops. Sutter announced that in addition to work on C++23, the committee also had time to progress on a number of post-C++23 proposals, including continued work on contracts, SIMD runtime, and more.
According to Sutter, the first in-person meeting canceled by the pandemic would have been the first meeting of C++23's three-year cycle. This means that almost the entire release cycle of C++23 and the entire "development" phase of the cycle was carried out via Zoom with several hundred teleconsultations from 2020 to 2022. Hence the name of code "Pandemic Edition". Several compilers already support some new features introduced by C++23. The new version of the programming language created by Bjarne Stroustrup supports a standard library module that speeds up compilation.
“Modules not only improve compilation speed and code hygiene, but also unify the source code organization of regular functions and templates. Eventually, modules will be the most significant improvement ever to the way we organize our code,” Stroustrup said. The .h/.cpp distinction disappears and the C++ source code is fundamentally simplified. With the standard library module, "Hello World" becomes the following:

import std;
int main()
   Std::cout<< "Hello, World!\n";

Stroustrup estimates that this code should compile 10 times faster than the old version using #include . He feels that C++23 has many minor improvements, but some won't seem minor. Stroustrup pointed out that this is not a major C++ upgrade like C++11 and C++20 have been. to complement C++20 and hopefully add some important features. However, the pandemic has put a limit on ambitions, including the difficulty of meeting in person.
As a result, features such as filtering, contracts, and a general model for concurrency (executors) will have to wait for C++26. Also, C++23 will not include a core feature that makes it easier to write code intended to run in parallel computing environments. The new standard will not come with an asynchronous algorithm feature called "senders and receivers", which will allow code to run concurrently on a system with multiple chips, such as CPUs and GPUs. This is a long-awaited feature.

Additionally, C++23 comes at a time when the debate over scrapping C/C++ in favor of modern, memory-safe languages ​​such as Rust. Rust has grown in popularity in recent years due to its secure memory management, and parts of the industry - including large companies such as Microsoft, Meta and Amazon - now advise to start new projects in Rust and not in C++. According to comments on the announcement of the end of work on the C++ 23 standard, the committee must come up with exciting new features in the future in order to keep C++ in the top position in the industry.
This place of choice is currently seriously threatened by C++ and even independent and state organizations are participating in the debate. Last month, Consumer Reports, a nonprofit that specializes in product testing, advocated for companies to abandon languages ​​such as C and C++ in favor of memory-safe languages ​​such as Rust. Consumer Reports believes that memory safety has always been a persistent source of flaws in the software industry, but new languages ​​are now making it possible to protect against these bugs in the design phase.

According to Consumer Reports, approximately 60-70% of browser and kernel vulnerabilities, as well as security bugs found in C/C++ codebases, are due to lack of memory security, many of which can be fixed by the use of memory safe languages. Additionally, in November 2022, the US National Security Agency (NSA) recommended that developers strategically move away from C and C++ languages. In the face of reports criticizing C++'s problems, Stroustrup said that "securing software through the Rust language is no better than that offered by C++".
“There is no single definition of security, and we can achieve a variety of security types through a combination of programming styles, supporting libraries, and leveraging analytics. static,” Stroustrup said. He thus suggests that what is possible to obtain from C++ in terms of securing software depends, among other things, on the developer and in particular on the knowledge of the tools offered by the language, his mastery of the compiler, etc. Although many believe that Rust is scrapping C/C++, it's clear that these will be around for a long time.

Leave comment

Save nickname and email in this browser for the next time.

close publicity
Nord VPN