Good Contract programming idiom?
Kagamin
spam at here.lot
Tue Mar 2 12:20:38 PST 2010
bearophile Wrote:
> I think most D programmers today want to remove runtime checks for unproven assertions, that's the point of the -release compile flag.
>
Never deemed -release flag as a useful thing, may be I just don't put in useless asserts?
And I don't think that detailed exceptions do a lot more than simple asserts. Job is done faster with simple assert and I don't see much difference between
IllegalArgumentException: wrong day
and
day>=1 && day<=31 assertion failed
Though the former may create better image for your library.
More information about the Digitalmars-d
mailing list