Good software design is sometimes understood as running a tight ship, in which every outcome of a program’s action is anticipated and carefully prepared for. I take an opposing view: in my experience, the tight ship model leads to brittle, unmaintainable programs. I prefer designs that are composed of loosely coupled components, leaving room for piecewise evolutionary change.
This looseness of coupling — this slack — is a resource that can be depleted as a program evolves. Perhaps surprisingly, we can counter the erosion of slack by setting rules for how components interact. The effect of the rules is to divide the slack into portions and allocate those portions to the futures of particular components.
In this lecture, I’ll be looking at various component interface mechanisms with an eye toward the ways they preserve or erode a program’s slack. I will pay particular attention to C++26 contracts, and discuss some contracts features proposed for C++29.
Lisa Lippincott designed the software architectures of Tanium and BigFix, two systems for managing large fleets of computers. She's currently assistant chair of the numerics study group of the C++ standardization committee. In her spare time, she studies mathematical logic, and wants to make computer-checked proofs of correctness a routine part of programming.