Contracts for C++
Details
We're back again, with visiting speaker (and former local), Timur Doumler to talk about Contracts for C++. Timur knows a thing or two about them, as co-chair of the WG21 committee that has spent the last 4+ years wrestling them into shape.
A big thanks to Maven who will be hosting us for the first time. Please note that we'll be meeting after the cleaners have finished for the night so please try to keep the place as clean as your code (no, cleaner!).
They will also need your full name for the door list. We'll ask for the name when you register (as this may be different from your username). This data will only be used for the door list and not published anywhere.
If you'd like to speak at a future event please get in touch at cppldn.uk/speak.
Here's the approximate schedule:
18:30 Doors open
19:00 "Intro and News" - Antony Peacock
19:10 "Why do we need std::minmax_element anyway?" - Aleksandar Šmigić
We will deduce from first principles a cute algorithm implementation present in the STL.
19:30 "Contracts for C++" - Timur Doumler
Design by Contract is a very effective approach for writing safer, more correct programs. It has been successfully implemented in programming languages like Eiffel and Ada. Attempts to add a Contracts facility to C++ have a long and storied history spanning two decades. Since the last attempt to standardise Contracts (for the C++20 Standard) has failed, SG21 — the Contracts Study Group on the C++ Standard Committee – has been working on a new design, the so-called Contracts MVP, which is now essentially feature-complete and on track to make it into the upcoming C++26 Standard.
In this talk, we present the current design of the Contracts MVP targeting C++26. We discuss preconditions, postconditions, assertions, contract-violation handling and much more. We consider how the Contracts MVP provides a superior replacement for custom assertion macros and, when used correctly, can significantly improve the safety and correctness of your code.
21:00 Conclusion
--
About the speakers:
Timur Doumler is the co-host of CppCast and an active member of the ISO C++ standard committee, where he is currently co-chair of SG21, the Contracts study group. Timur started his journey into C++ in computational astrophysics, where he was working on cosmological simulations. He then moved into the audio and music technology industry, where he has been working for over a decade and co-founded the music tech startup Cradle. In the past, Timur also worked for JetBrains, first as a developer on CLion's C++ parser and later as a Developer Advocate for C++ developer tools. Currently, Timur lives in Finland, where he works as an independent consultant and organises the monthly C++ Helsinki meetup.
Aleksandar is a Quantitative Developer at Citadel Securities.
