September 20, 2020

What is the standard Library?

DISCLAIMER The following represent my opinions, not that of the C++ committee (WG21), any of its members or any other person mentioned in this article. I think the most fundamental work done by WG21 is trying to answer meta-questions about itself. What is C++, what is its essence, what should we focus on? How to evolve a language with a growing community, a growing committee? A language that is deployed on billions of devices, with an estimated 50 billions actively maintained lines of code. Read more

August 30, 2020

The problem with C

In the early 70s, C was created at Bell Labs as a byproduct of the development of UNIX. It quickly became one of the most popular programming languages. But it was not expressive enough for Bjarne Stroustrup. And so, in 1983, as a byproduct of his Ph.D. thesis, he extended C. C with classes was born. At the time, Bjarne Stroustrup understood that a programming language has many components, not only the language, its compiler, but also a linker and libraries. Read more

August 23, 2020

Standard library development made easy with C++20

When he created Go as a knee-jerk Reaction to C++11, Rob Pike proclaimed Less is exponentially more. While it is anyone’s guess what that is supposed to mean, in this blog post we will see how C++20 is less verbose, yet more expressive than prior C++ versions. I am a big fan of concepts-driven designs. The use of concepts leads to less coupled, more generic interfaces that work with more types. Read more

June 16, 2020

Non-terminal variadic template parameters

A few months ago I presented a few features that I hope will be considered for C++23. I have since then submitted papers for multi-dimensional subscript expressions and '_` as a variable placeholder. In this article I want to talk about another improvement I would like to see in the next C++ version: Non-trailing variadic template parameters. Indeed, while parameter packs can appear before the last function parameter, they do not get properly deduced when they do. Read more

April 12, 2020

To humbly present a wish-list for C++23

In Prague, the committee adopted To boldly suggest an overall plan for C++23, a paper that lays a list of priorities WG21 should focus on for C++23. The vote was almost unanimous. I voted against it. I figured it would be interesting to explain why. The problem with plans Plans have a nasty tendency to turn into deadlines and expectations. There was an uproar when contracts did not ship (even though that was the right decision), while coroutines have shipped with known issues and modules have shipped with little experience with the feature as it is in the standard. Read more