C ++ 20 approved as the new gross standard of the programming language

C ++ 20 approved as the new gross standard of the programming language

The design for specifying c ++ 20 (iso / iec 14882: 2020) as the last-ma-compatible standard of the c ++ programming language has been ratified over the weekend. He brings significant innovations for developers. Like c ++ 11, the last rough standard of language – c ++ 14 and c ++ 17 are only considered intermediate steps – c ++ 20 will change the way developers program in modern c ++ – this is especially true ranges, coroutins, concepts and modules.

In addition, there are innovations in numerous features that affect the circling language, the library and the concurrency: about the three-way comparison operator , overlays on the lambda functions and templates, a calendar and formatting library, semaphores and improved handling with thread that let interrupt.

The coarse four

Concepts are an extension of the templates of c ++, with which semantic categories can be defined for the quantity of approved data types. Thanks to concepts, the applicable and defining templates will be significantly easier and expressive. The ranges library allows the standard template library algorithms to apply directly to the stl containers to link them to the pipe operator known from the unix shell and define on infinite data streams.

With coroutines c ++ 20 supports asynchronous programming. Thus, cooperative multitasking, infinite data streams, event loops or pipelines should be elegantly implemented. They are generalized functions that can stop their execution and recording. You keep your condition. Coroutines represent the typical way of writing event-powered applications. In fact, c ++ 20 contains no concrete corouts, but a framework for writing coroutines. It consists of more than twenty functions, which must be implemented partially or can.

Modules are a significant improvement: they guarantee faster compilation times as they make a repeated replace (as it is necessary for the header files). With modules you can develop developer praprocessor macros. This is the order in which you include header files no longer decisive. Modules print the logical structure of the code and allow to assemble new module packages from existing modules. The need to access erroneous macro tricks is attributable, and injuries of the one definition rule (odr) obedience the past.

No official statement

An official statement for approval of the standard is so far. That the iso standard was admitted to patrice roy’s short statement near twitter: "c ++ 20 has been approved!" roy is part of the c ++ standardization committee.

Leave a Reply

Your email address will not be published. Required fields are marked *