New paper: N3604, Centralized Defensive-Programming Support for Narrow Contracts -- Lakos, Zakharov
A new WG21 paper is available. A copy is linked below, and the paper will also appear in the next normal WG21 mailing. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.
Document number: N3604
Date: 2013-03-18
Centralized Defensive-Programming Support for Narrow Contracts
by John Lakos, Alexei Zakharov
Excerpt:
In this proposal, we describe a centralized facility for supporting defensive runtime validation of function preconditions. What makes this overall approach ideally (and uniquely) suited for standardization is that it allows the application to (1) indicate coarsely (at compile time) the extent to which precondition checking should be enabled based on how much defensive overhead the application (as a whole) can afford, and (2) specify exactly (at runtime) what action is to be taken should a precondition violation be detected.