Are contracts intended for verifying @safety;

Somebody via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Nov 7 12:58:27 PST 2016


On Monday, 7 November 2016 at 20:42:26 UTC, ag0aep6g wrote:
>
> Apparently, yes: `version (D_NoBoundsChecks)`.
>
> http://dlang.org/spec/version.html#predefined-versions
>
>
> You're probably aware of it, but just to be sure: Note that 
> -noboundscheck (or -boundscheck=off) absolutely breaks safety.

Yes I am. Using that is in my understanding unwise in any trivial 
project. Thanks for your help and the warning. This anyway seems 
to let choose the best tradeoff when compiling, unlike enforce, 
assert in @system or my original contracted version.




More information about the Digitalmars-d-learn mailing list