> I fail to see the Contracts thing more than an over-hipster'd assert...

Contracts are specified up front, not hidden somewhere in the code. They also 
make explicit which tests are preconditions, which are postconditions, which 
are invariants, etc. Sure, you _could_ use assert in a similar way, just like 
you _could_ use goto in a way that enables for, while, repeat, etc.

Another suggestion: unless you incorporate a prover, assert really only works 
well for run-time checks IMHO, whereas contracts (at least in SPARK 2014) work 
as compile-time checks. You don't want airplane software to discover in mid-air 
that a contract isn't satisfied.

Reply via email to