Ghost fields for Contract Programming

Denis Koroskin 2korden at gmail.com
Sat Oct 9 13:31:20 PDT 2010


On Sat, 09 Oct 2010 23:51:44 +0400, Tomek Sowiński <just at ask.me> wrote:

> bearophile napisał:
>
>> The ghost fields may be used to store partial computations useful to  
>> reduce the work done
> by the class invariant.
>
> You can do:
>
> class C {
>   version(unittest) int temp;
>   invariant() {
>     // use temp
>   }
> }
>
> Or am I missing something?
>

How often do you *run* your application with unittests enabled?


More information about the Digitalmars-d mailing list