Overview
Explore the concept of Design by Contract in C++20 through this comprehensive ACCU 2019 conference talk. Delve into the upcoming language feature of contracts, learning how they can enhance interface clarity and pinpoint responsibility in case of bugs. Gain insights on formulating effective contracts, their impact on interface design, and potential pitfalls in C++ implementation. Discover practical examples, including Ring Buffers, and understand key concepts such as preconditions, postconditions, invariants, and contract violations. Benefit from the speaker's personal opinions and extensive programming experience dating back to 1980. Acquire valuable guidance on thinking processes for contract formulation and interface design optimization.
Syllabus
Intro
Welcome
What are contracts
How I learned about contracts
Systematic approaches to program construction
Ring Buffers
Precondition
Preconditions
Postcondition
Exceptions
Post Conditions
Contract Logic
Invariants
Portrait specialization
Specializations
Subcontractors
Why bother
Contract Violations
Science Fiction
The Draft Standard
Contract Attributes
Contract Attributes Example
Taught by
ACCU Conference