By Herb Sutter, Technical Fellow
Earlier this year, Citadel Securities hosted another C++ Meetup where I spoke about the sea change in progress toward memory/functional safeties and compile-time reflection, why it is game-changing, and why I think it will define a new era of C++ in the next decade.
The room was packed for the talk at my first NYC++ Meetup, and it was great to see lots of friends there (including a bunch of WG21 members). From my talk to the Q&A to the reception that followed, the conversations were engaged, insightful and made me even more excited about how the developments in C++ are, and will continue to, create tons of interesting opportunities for engineers.
In C++’s history so far, we’ve had only one major milestone that changed the way we write C++ code to the point that Bjarne Stroustrup said it “feels like a new language”: C++11, followed up by C++14/17/20/23.
C++11 changed how we write code to the extent that to this day you can look at 10 to 20 lines of code and immediately see whether it’s “C++11 era” or not. That’s because C++11 included many features we just use all the time: range-based for-each loops, lambda functions, standard smart pointers, { } initializer lists, and more. If you see any of those, you know the code is “modern C++.” We’ve built more great things on top of C++11 since then, including “big” features like concepts and coroutines and modules, but none of those have been as “major” in terms of affecting any random 10-20 lines of code so that they define a new style era; so far we’ve stayed in the era where “modern C++” still means “C++11 onward.”
That is going to start changing with C++26: In this era, having increasing memory/functional safety support and reflection support will change how we write code in a way we’ll start to notice in typical 10-20 LOC samples. So in the coming years, I think we’re going to start calling code “modern C++” when it assumes more memory safety by default (such as the hardened standard library that was just adopted for C++26), uses more functional safety features like contract_assert and pre- and post-conditions that were also just adopted for C++26 and uses reflection-based techniques—all of those will frequently change how we write code, for the better.
At the meetup, I also talked about how C++26’s std::execution (aka Sender/Receiver) is a game changer for both concurrency and parallelism, and why that’s a great surprise because those two requirements are very different.
By Herb Sutter, Technical Fellow
Earlier this year, Citadel Securities hosted another C++ Meetup where I spoke about the sea change in progress toward memory/functional safeties and compile-time reflection, why it is game-changing, and why I think it will define a new era of C++ in the next decade.
The room was packed for the talk at my first NYC++ Meetup, and it was great to see lots of friends there (including a bunch of WG21 members). From my talk to the Q&A to the reception that followed, the conversations were engaged, insightful and made me even more excited about how the developments in C++ are, and will continue to, create tons of interesting opportunities for engineers.
In C++’s history so far, we’ve had only one major milestone that changed the way we write C++ code to the point that Bjarne Stroustrup said it “feels like a new language”: C++11, followed up by C++14/17/20/23.
C++11 changed how we write code to the extent that to this day you can look at 10 to 20 lines of code and immediately see whether it’s “C++11 era” or not. That’s because C++11 included many features we just use all the time: range-based for-each loops, lambda functions, standard smart pointers, { } initializer lists, and more. If you see any of those, you know the code is “modern C++.” We’ve built more great things on top of C++11 since then, including “big” features like concepts and coroutines and modules, but none of those have been as “major” in terms of affecting any random 10-20 lines of code so that they define a new style era; so far we’ve stayed in the era where “modern C++” still means “C++11 onward.”
That is going to start changing with C++26: In this era, having increasing memory/functional safety support and reflection support will change how we write code in a way we’ll start to notice in typical 10-20 LOC samples. So in the coming years, I think we’re going to start calling code “modern C++” when it assumes more memory safety by default (such as the hardened standard library that was just adopted for C++26), uses more functional safety features like contract_assert and pre- and post-conditions that were also just adopted for C++26 and uses reflection-based techniques—all of those will frequently change how we write code, for the better.
At the meetup, I also talked about how C++26’s std::execution (aka Sender/Receiver) is a game changer for both concurrency and parallelism, and why that’s a great surprise because those two requirements are very different.
1 / 2
1 / 2
1 / 2
1 / 2
All these things in draft C++26 matter because they help us make our code better—more efficient, reliable and resilient. The improvements coming in C++ are directly applicable to our business at Citadel Securities, which is why we aren’t waiting for the ink to dry on the standard to adopt them and deploy them live. Here are two examples:
By adopting a few well-chosen cutting-edge standard features early internally, we get to “live in the future” by using them right away even before they ship in the standard itself. That not only lets us get the technical benefits sooner, but it lets us build our individual expertise and experience with features that everyone will be using everywhere in the coming years.
Meetups like NYC C++ flourish when companies engage to provide facilities and speakers. Citadel Securities was proud to sponsor the January meetup because we believe it is an investment in the community that benefits everyone—the attendees and the sponsors. Everyone learns technically and gets connected professionally. Come see us at a future meetup! Some upcoming ones are below:
Interested in learning more about engineering roles or joining our team?
1.Measured based on publicly reported total transaction volume averaged over the past 12 months.
All these things in draft C++26 matter because they help us make our code better—more efficient, reliable and resilient. The improvements coming in C++ are directly applicable to our business at Citadel Securities, which is why we aren’t waiting for the ink to dry on the standard to adopt them and deploy them live. Here are two examples:
By adopting a few well-chosen cutting-edge standard features early internally, we get to “live in the future” by using them right away even before they ship in the standard itself. That not only lets us get the technical benefits sooner, but it lets us build our individual expertise and experience with features that everyone will be using everywhere in the coming years.
Meetups like NYC C++ flourish when companies engage to provide facilities and speakers. Citadel Securities was proud to sponsor the January meetup because we believe it is an investment in the community that benefits everyone—the attendees and the sponsors. Everyone learns technically and gets connected professionally. Come see us at a future meetup! Some upcoming ones are below:
Interested in learning more about engineering roles or joining our team?
1.Measured based on publicly reported total transaction volume averaged over the past 12 months.