enforce()?

Lutger lutger.blijdestijn at gmail.com
Tue Jun 15 22:36:22 PDT 2010


bearophile wrote:

> I have counted about 200 usages of std.contracts.enforce() inside Phobos.
> Can you tell me what's the purpose of enforce() in a language that has
> built-in Contract Programming?

I'd think of it this way: enforce() is part of defensive programming, and contracts are related to software testing. 
 
> And what are the purposes of std.contracts.AssumeSorted()? Is it useful
> for something?
> 
> Bye,
> bearophile
> (I know this is not the digitalmars.D.learn newsgroup).



More information about the Digitalmars-d mailing list