DMD 1.027 and 2.011 releases

Christopher Wright dhasenan at gmail.com
Wed Feb 27 05:56:34 PST 2008


eao197 wrote:
> B.foo may looks like:
> 
> void foo() nothrow
>   in { assert( <some condition> ); }
>   out { assert( <some condition> ); }
>   body { <some code without exception> }
> 
> Body of B.foo() doesn't throw exception but assert in pre/postcondition 
> could do that. A call of B.foo could produce exception but B.foo is 
> declared as 'nothrow' :(
> 

I'm happy with that. Contracts aren't compiled in release mode, and they 
aren't part of the function; they're part of the tests. I'd hate to have 
to avoid one language feature for reliability in order to gain another one.


More information about the Digitalmars-d-announce mailing list