www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Contract programming

reply bearophile <bearophileHUGS lycos.com> writes:
Regarding the contract programming, there's this video (found with Lambda the
Ultimate) of Contract Programming recently added to the dotnet (note there are
WMA and MP4 versions of this video too, but they are hidden in this page, just
before comments, under 'downloads'):
http://channel9.msdn.com/pdc2008/TL51/

They show:
- How to the IDE manages contracts, it seems a good enough way.
- Some static contract checking too, artithmetic exceptions, etc.
- At about 22.08 it says the contract part of the code can call other functions
too, but only if they are pure (I think this is a good little thing to enforce
in SafeD. I don't know if a warning can be raised in normal D if this is false).
- that contracts are used to automatically generate some documentation too.

Bye,
bearophile
Nov 17 2008
parent Robert Fraser <fraserofthenight gmail.com> writes:
bearophile wrote:
 Regarding the contract programming, there's this video (found with Lambda the
Ultimate) of Contract Programming recently added to the dotnet (note there are
WMA and MP4 versions of this video too, but they are hidden in this page, just
before comments, under 'downloads'):
 http://channel9.msdn.com/pdc2008/TL51/
 
 They show:
 - How to the IDE manages contracts, it seems a good enough way.
 - Some static contract checking too, artithmetic exceptions, etc.
 - At about 22.08 it says the contract part of the code can call other
functions too, but only if they are pure (I think this is a good little thing
to enforce in SafeD. I don't know if a warning can be raised in normal D if
this is false).
 - that contracts are used to automatically generate some documentation too.
 
 Bye,
 bearophile

Good idea. Ugly syntax & _way_ too strict for anything but a public API.
Nov 18 2008