What does “modern C++” mean? Some say it started in 2001 with Andrei Alexandrescu’s book Modern C++ Design. A lot of people describe C++11 and C++14 as modern; others say, “It’s time to stop calling C++11/14 modern C++, it’s not modern anymore.”
Here’s another idea. The art world already settled this, so let’s take a cue from there.
Modern art is not really being produced today. The modern art period stretched roughly from impressionism through fauvism, cubism, etc and ended by the 1970s. Art being produced today is usually termed contemporary art. If I called Banksy’s output “modern art”, I’d just be wrong — and confusing. Note though that there is an overlap in the modern art and contemporary art periods.
(Disclaimer: I am not an artist or an art historian. I am just someone with a broad education who can use Wikipedia.)
I propose the same for C++. Modern C++, like modern art, had a relatively long period. Maybe it did start in 2001; certainly it was influenced a lot by Boost in the aughts; and it became properly recognized with C++11 and C++14. Like many things, we can only recognize the period and its roots in hindsight, so the term gains popularity only much later.
I think with C++20 and later, we are now in the contemporary C++ period. I propose roughly that the modern C++ period ended and the contemporary period started somewhere in the C++17 to C++20 years. The modern period was characterized by all the things that C++11 through C++17 brought to the language – lambdas, type support, sum types, etc, enabling more genericism. The contemporary period includes concepts in the language, ranges, and more that C++20 and beyond brought us.
It is certainly my experience that there is a large difference between working in C++20 and being limited to C++17. Another observable division here is that largely, in the modern period, C++ development was informed by folks working in Boost (lambdas, optional); in the contemporary period it is informed at least as much by independent libraries (libfmt, range-v3).
As with art, there is some overlap. Clearly ranges were in development during the modern period, just as the early modernists (e.g. Andrei, 20-25 years ago) were practising in the pre-modern era. But I would say that C++ written in 2023 (contemporary) is as different to C++ written in 2011 (modern) as C++ written in 2011 is to C++ written in 1998.
The “hump” of modern C++ was perhaps half a standard lifetime away now. It was a necessary stepping stone to contemporary C++. But it’s time to recognize what delimits a useful definition of modern C++, and to adopt a new term. We are now in the contemporary C++ period. Maybe still in the early part, but that’s what I’m going to start calling it. C++11/14 is squarely modern (it’s not time to stop calling it that); C++20 and beyond is contemporary.