should postconditions be evaluated even if Exception is thrown?

Michal Minich michal.minich at gmail.com
Fri Dec 4 06:13:19 PST 2009


Hello Leandro,

> I think postconditions should only be able to inspect (in a read-only
> manner) the exception; once the postcondition finished executing, the
> exception should be propagated as is.
> 

heating up the processor for no effect whatsoever?!

Note also that it is possible, and desired, to use assert statement in conditions; 
this statement can throw Error (it is corner case of changing behavior of 
program, but we can consider that it is not changing anything, because it 
should end the program very fast anyway).





More information about the Digitalmars-d mailing list