C# contracts video

bearophile bearophileHUGS at lycos.com
Tue Jul 12 18:35:58 PDT 2011


A long video presentation of C# contracts, "Compile-time Verification, It's Not Just for Type Safety Any More" (Jul 05, 2011), by Greg Young (the speaker is quite bombastic):
http://www.infoq.com/presentations/Contracts-Library

The compile-time error shown in the video at about 10 minutes and 40 seconds is doable in D with this idea I've shown:
http://d.puremagic.com/issues/show_bug.cgi?id=5906

While the error shown from 11.45 requires something much better, as the solver/inferencer used by them.

He says they are slowly adding contracts to all the dotnet framework.

He says (30 minutes 20 seconds) that most unittests become useless. The compiler even says some certain unittests can't fail (after statically verifying the contracts).

He says that all this stuff is still in its infancy (in dotnet, the Contracts library itself, etc).

He says that the dynamic keyword and the contracts, both added to C#4, are essentially one against each other.

Around 53.00 he explains the risks of overspecification in Contracts (that cause problems similar to writing too many unittests), or adding too much specific contracts to an interface, while they are fit for a single implementation of it.

Bye,
bearophile


More information about the Digitalmars-d mailing list