Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

The Joy of C++26 Contracts - Myths, Misconceptions and Defensive Programming

CppCon via YouTube

Overview

Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
Explore the upcoming C++26 contracts feature in this comprehensive conference talk by Herb Sutter from CppCon 2025. Discover why defensive programming is essential for functional and memory safety, and learn how C++26 contracts significantly improve upon traditional C assert macros through declaration-based syntax, release build compatibility, and superior language support. Master the essential best practices for effective contract usage, including keeping compound conditions together, avoiding side effects, and understanding the trade-offs of throwing violation handlers. Examine why contracts are both viable for production environments and minimal yet complete for large-scale implementation, with systematic analysis of each necessary component. Gain insights into future contract evolution including virtual function support and groups/labels functionality, while addressing common myths and misconceptions through a detailed FAQ review. Led by Herb Sutter, technical fellow at Citadel Securities, ISO C++ committee chair, and designer of multiple Standard C++ features, this talk provides authoritative guidance on leveraging contracts to simplify and strengthen C++ code.

Syllabus

The Joy of C++26 Contracts - Myths, Misconceptions & Defensive Programming - Herb Sutter

Taught by

CppCon

Reviews

Start your review of The Joy of C++26 Contracts - Myths, Misconceptions and Defensive Programming

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.