{"id":1734,"date":"2023-11-01T10:07:51","date_gmt":"2023-11-01T16:07:51","guid":{"rendered":"https:\/\/www.elbeno.com\/blog\/?p=1734"},"modified":"2023-11-01T14:26:10","modified_gmt":"2023-11-01T20:26:10","slug":"modern-c-how-about-contemporary-c","status":"publish","type":"post","link":"https:\/\/www.elbeno.com\/blog\/?p=1734","title":{"rendered":"Modern C++? How about Contemporary C++?"},"content":{"rendered":"\n<p>What does &#8220;modern C++&#8221; mean? Some say it started in 2001 with Andrei Alexandrescu&#8217;s book <em><a href=\"https:\/\/www.amazon.com\/Modern-Design-Generic-Programming-Patterns\/dp\/0201704315\">Modern C++ Design<\/a><\/em>. A lot of people describe C++11 and C++14 as modern;  <a href=\"https:\/\/cppsenioreas.wordpress.com\/2023\/06\/20\/from-modern-to-unbelievably-modern-c\/\">others say<\/a>, &#8220;It\u2019s time to stop calling C++11\/14 modern C++, it\u2019s not modern anymore.&#8221;<\/p>\n\n\n\n<p>Here&#8217;s another idea. The art world already settled this, so let&#8217;s take a cue from there.<\/p>\n\n\n\n<p><a href=\"https:\/\/en.wikipedia.org\/wiki\/Modern_art\" data-type=\"link\" data-id=\"https:\/\/en.wikipedia.org\/wiki\/Modern_art\">Modern art<\/a> 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 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Contemporary_art\">contemporary art<\/a>. If I called Banksy&#8217;s output &#8220;modern art&#8221;, I&#8217;d just be wrong &#8212; and confusing. Note though that there is an overlap in the modern art and contemporary art periods.<\/p>\n\n\n\n<p>(Disclaimer: I am not an artist or an art historian. I am just someone with a broad education who can use Wikipedia.)<\/p>\n\n\n\n<p>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.<\/p>\n\n\n\n<p>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 &#8211; 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.<\/p>\n\n\n\n<p>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).<\/p>\n\n\n\n<p>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 (<a href=\"https:\/\/www.youtube.com\/watch?v=yUIFdL3D0Vk\">contemporary<\/a>) is as different to C++ written in 2011 (<a href=\"https:\/\/www.youtube.com\/watch?v=D5n6xMUKU3A\">modern<\/a>) as C++ written in 2011 is to C++ written in 1998.<\/p>\n\n\n\n<p>The &#8220;hump&#8221; of modern C++ was perhaps half a standard lifetime away now. It was a necessary stepping stone to contemporary C++. But it&#8217;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&#8217;s what I&#8217;m going to start calling it. C++11\/14 <em>is<\/em> squarely <em>modern<\/em> (it&#8217;s not time to stop calling it that); C++20 and beyond is <em>contemporary<\/em>.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>What does &#8220;modern C++&#8221; mean? Some say it started in 2001 with Andrei Alexandrescu&#8217;s book Modern C++ Design. A lot of people describe C++11 and C++14 as modern; others say, &#8220;It\u2019s time to stop calling C++11\/14 modern C++, it\u2019s not modern anymore.&#8221; Here&#8217;s another idea. The art world already settled&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1734","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1734","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1734"}],"version-history":[{"count":2,"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1734\/revisions"}],"predecessor-version":[{"id":1736,"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1734\/revisions\/1736"}],"wp:attachment":[{"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1734"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1734"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1734"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}