Automatic invariant generation

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Sun Jul 9 04:13:02 PDT 2017


On 7/7/2017 7:08 AM, Nicholas Wilson wrote:
> It is certainly unacceptable in the 
> long run to demand that if users wish to use DCompute that they can't have 
> asserts _in the code running in the host_.

One thing you can do is replace:

     assert(i > 3);

with:

     if (!(i > 3)) assert(0);

which won't be removed with -release, and the only bloat will be a lovely HLT 
instruction.


More information about the Digitalmars-d mailing list