06/01/2021
Should you learn C++ In 2021?
With 2020 coming to a close, and C++20 about to enter the market, now that the C++20 standard has been finalized, the question of Should I learn C++ in 2021 sounds like common sense. After all, the C++20 upgrade is said to be as groundbreaking as was the C++11 one that modernized the language and rescued it from certain obsolescence, and the way of Cobol.
We will try to present some facts about the current standing of C++, equipping you with the type of information needed for making an informed decision. Learning a new programming language, especially one as complex as C++, is a significant investment in time, so knowing if it will be useful, will be helpful.
Four Major Additions:
Concepts:
Concepts make sure that data used within a template fulfill a specified set of criteria, and verifies this at the beginning of the compilation process. As a result, the compiler can provide a short and meaningful error message if the defined requirement of a concept isn’t met.
Coroutines:
Coroutines are generalized functions that can be suspended and resumed while keeping their state. Because of them, asynchronous programming in C++ may become mainstream. Coroutines are the basis for cooperative tasks, event loops, infinite data streams, or pipelines.
Ranges:
Ranges are new iterators for ranges such as vectors or lists. They support algorithms that can operate directly on the container, be evaluated lazily, and be composed.
Modules:
Modules can be used to divide large blocks of code into logical parts. They result in faster compile times, make header files redundant, and can help rid of macro workarounds.
vesedia.com