What does Bjarne Stroustrup think of C ++

Bjarne Stroustrup: Every C ++ standard is a snapshot

Bjarne Stroustrup has achieved some fame as the father of the C ++ programming language; even today he is still involved in the standardization of C ++. In an interview with heise Developer, Stroustrup explains what will be of long-term importance for developers in C ++ 20 and what the future of the programming language looks like.

heise Developer: Which new features from C ++ 20 will be most important for C ++ in the long term and why?

Dr. Bjarne Stroustrup: Modules, concepts and coroutines.

Modules will finally bring us better code hygiene (less macro pollution), easier compilation of code from libraries and much faster compilation. I look forward to mature module implementations that can be easily integrated into the general program development environment. It will take time.

Please be aware that C ++ 20 will not be official for a few more months until the ISO Secretariat in Geneva has completed its non-technical review [Note Red .: the interview is from summer 2020]. So we should be satisfied with early implementations and not be too impatient with imperfections. We also first have to learn to use modules well. Much of what we do is riddled with bad habits from nearly 50 years of #include and #define. Just because we are familiar with the preprocessor doesn't mean that it is easy to use.

Concepts Generic programming will probably come very close to what ordinary programming is today. They will make our code much more flexible, reusable and efficient. When I designed the templates, I wanted three things:

  • Expressiveness Generality, where "Expressiveness" stands for the ability to express an idea concisely and directly. "Generality" is the ability to do this for a wide range of subjects rather than just having a limited set of choices as provided by the designer.
  • Unmatched efficiency.
  • Type checking as "precise specification".

I managed the first two, but not the third point. That was enough to make generic programming and metaprogramming with templates a resounding success, but it strained the possibilities of the programming language and its implementation beyond an acceptable level. The fact that reasonable people were willing to endure these imperfections in order to gain the benefit makes a strong case that the basic ideas of C ++ are sane.