www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - C# contracts video

reply bearophile <bearophileHUGS lycos.com> writes:

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).


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
Jul 12 2011
parent reply Robert Clipsham <robert octarineparrot.com> writes:
On 13/07/2011 02:35, bearophile wrote:

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).


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
-- Robert http://octarineparrot.com/
Jul 13 2011
parent bearophile <bearophileHUGS lycos.com> writes:
Robert Clipsham:


I think they have not improved them a lot, lately. Bye, bearophile
Jul 13 2011