A problem with D contracts

Walter Bright newshound2 at digitalmars.com
Sun Aug 1 13:02:13 PDT 2010


bearophile wrote:
> Jonathan M Davis:
>> IIRC TDPL, specifically mentions that contracts allow for I/O for debugging
>> purposes.
> 
> I have not yet read that part. I see print statements (and exceptions) inside
> contracts as something to kill with fire in my code. What's the purpose of
> printing stuff in contracts?

Debugging support, as mentioned in TDPL.

Being able to pepper one's code with print statements to find out where it goes 
wrong is an INCREDIBLY useful debugging technique.


More information about the Digitalmars-d mailing list