0:00 / 0:00
#c++26#contracts#defensiveprogramming
The Joy of C++26 Contracts - Myths, Misconceptions & Defensive Programming - Herb Sutter
CppCon
189K subscribers • 101 videos on Hallway • Conference channel
- One of the most-watched uploads on CppCon, a conference or university channel Hallway lists. Nobody has recommended it in the communities yet, so it ranks below community picks.
- Presented by Herb Sutter
- Linked in the descriptionCppCon/CppCon2025
Intermediate. Assumes working knowledge.
78K views11 months ago
Programming languagesC++Language design and type systems
Herb Sutter explains the upcoming C++26 contracts feature, covering defensive programming, best practices, and how they improve on traditional assertions.
cppcon.org --- The Joy of C++26 Contracts - Myths, Misconceptions & Defensive Programming - Herb Sutter - CppCon 2025 --- This talk is all about the C++26 contracts feature. It covers the following topics: - Why defensive programming is a Good Thing (mainly for functional safety, but occasionally also for memory safety) - Brief overview of C++26 contracts, and why they’re way better than C assert (spoiler: writing them on declarations, being able to use them in release builds, and language support is just way better than macros) - The 3-page “Effective C++ Contracts book” — best practices you need to know to use them (spoiler: keep compound conditions together, don’t write side effects, understand the pros and cons of installing a throwing violation handler… that’s pretty much… it?) - Why they’re viable, because they address the key things we need in production (which we’ll list) - Why they’re minimal, because we actually need every part in C++26 to use them at scale (which we’ll do by systematically summarizing why each piece is necessary) - What the future evolution of contracts holds (spoiler: virtual functions! groups/labels!) - A review of Frequently Asked Questions --- Slides: github.com/CppCon/CppCon2025/blob/main/Presentations/The_Joy…(and_Some_Mythconceptions).pdf Work at Hudson River Trading (HRT): tinyurl.com/safxfctf --- Herb Sutter Herb is a technical fellow at Citadel Securities, designer of several Standard C++ features, and chair of the ISO C++ committee and the Standard C++ Foundation. His current interest is simplifying C++. --- CppCon is the annual, week-long face-to-face gathering for the entire C++ community. The conference is organized by the C++ community for the community. You will enjoy inspirational talks and a friendly atmosphere designed to help attendees learn from each other, meet interesting people, and generally have a stimulating experience. Taking place this year in Aurora, Colorado, near the Denver airport, and including multiple diverse tracks, the conference will appeal to anyone from C++ novices to experts. Annual CppCon Conference - cppcon.org linkedin.com/company/cppcon x.com/cppcon facebook.com/CppConference reddit.com/r/cppcon/ mastodon.social/@CppCon --- Videos Filmed & Edited by Bash Films: BashFilms.com YouTube Channel Managed by Digital Medium Ltd: events.digital-medium.co.uk --- #cpp #cplusplus #cppcon #cppprogramming #cplusplusprogramming #softwaredevelopment #softwareengineering #coding #code #computerscience #technology #technews #programming #programmerWhy it's here
A top upload from a listed channelCppCon is on Hallway's list of conference and university channels, and this upload is one of its most-watched talks or lectures. Nobody has recommended it in the communities yet, so it ranks below community picks.