against enforce
Kagamin
spam at here.lot
Mon Mar 28 04:56:18 PDT 2011
Jonathan M Davis Wrote:
> Whereas I _rarely_ use in contracts. In most cases, I favor exceptions,
> treating my functions as API functions pretty much as long as they're public.
> That's not always the best approach, but it's generally what I end up using.
So why do you need a feature, which you don't use?
Also if a feature isn't used, doesn't it mean it's useless?
> out, on the other hand, I don't use as much. It's not terribly common that
> there's a good test to run on the return value of a function in my experience.
> Upon occasion, it's useful, but rarely. Unit tests generally solve the problem
> better with regards to testing output. They're still useful though - just not
> commonly so.
If you don't prohibit contracts to check external data, you can enforce the check at design time with out contract. How would you check that caller checks received data?
More information about the Digitalmars-d
mailing list