
Simple Contracts for C++ [pdf] - vmorgulis
http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2015/n4415.pdf
======
Animats
It's hard to retrofit this to C++.

This proposal has no object invariants, which are one of the most useful kinds
of assertions. Especially since you write them once for the object, and they
apply to all the public function members. But then you have to clarify when
control enters and leaves an object. If you can call a public function member
from another function member of the same object, you've re-entered the object.
Does the object invariant have to be true when you do that? Spec# addressed
that, but this doesn't.

Function calls in assertions are a problem. You'd like to require that such
functions not have side effects, so that turning off assertion checking
doesn't change program behavior. They don't seem to require this.

Trying to tighten up C++ is like trying to make a colander leakproof. I've had
a go at that myself. I've given up and now take the position that Rust is the
future.

