Following the event, we wanted to know what our LEDAS programmers thought about C++ 20, and now we have their answers available to share with you.
C++ 20 highlights four major new features: concepts, ranges, coroutines, and modules. Here is how our developers indicated their interest in these offerings from the С++ committee.
Personally, I have not written any C++ code for several years, so I can’t really appraise the new functions professionally. My personal favorite, however, would be coroutines, as it looks like they will make concurrent execution of different tasks easier.
I think that concepts and modules may be most useful in industrial programming, as they provide additional means for integrating multi-module environments, which are in common use these days.
In contrast, ranges do not appeal to me at all. I was a junior researcher in the field of interval math during my final university years, and so I could have been in the tiny portion of C++ coders who might have needed ranges, but I didn’t. It looks to me like ranges don’t solve any actual problems, but are just another function that makes C++ overloaded with ever more features, and so steal time from C++ students and coders.
Should the C++ committees be addressing more important things? Our questionnaire asked, “Which missing C++ feature is most needed now?” The most popular answer from our programmers was “compilation time.” This is not a solution; this is a formulation of the problem and could possibly be treated through different actions. Nevertheless, faster compilation time is what our developers want more than any other thing.
Contemporary C++ projects in demanding areas such as industrial engineering software are very large. They contain many pieces of code, which in some cases come from different eras and were implemented with different methodologies, yet are all linked together. Sadly, it looks like that as time goes by, the problem will get worse. I suppose this is much harder to address than to just add some syntactic sugar like ranges, and then promote them as exciting advantages to the new standard.
Other answers we received from our survey respondents included the following:
- “Advanced implementation of modules”
- “Dividing C++ into core and other parts”
- “Better implementation of macros”
- “Avoid making new C++ standards”
- “Change the C++ committee so it will focus on real problems”
You may also look at the statistic of which C++ standards are used in our R&D projects.
Remember to take into account that we develop or participate in the development of geometric kernels, solvers, and engines. These building blocks have to be available in different versions so that they can be used in different end-user products. This explains the presence of older standards.