enforce()?

Steven Schveighoffer schveiguy at yahoo.com
Wed Jun 16 03:47:57 PDT 2010


On Tue, 15 Jun 2010 22:23:15 -0400, Andrei Alexandrescu  
<SeeWebsiteForEmail at erdani.org> wrote:

> 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?
>
> You need to read TDPL for that :o).
>
>> And what are the purposes of std.contracts.AssumeSorted()? Is it
>> useful for something?
>
> AssumeSorted was an experiment. I think it has drawbacks that I don't  
> know how to address, so I'll retire it.

Hm... what are the drawbacks (besides it not being enforced)?  I thought  
it was a good solution.

-Steve


More information about the Digitalmars-d mailing list