Preconditions and Postconditions - selective enable/disable

user1234 user1234 at 12.de
Mon Dec 1 03:39:22 UTC 2025


On Monday, 1 December 2025 at 00:15:00 UTC, Brother Bill wrote:
> Can we ship our application to Production with Preconditions 
> enabled, but with Postconditions and Invariants disabled?  If 
> so, how to?
>
> This would allow nervous managers to still have Preconditions 
> active in Production, with slower performance.  After 3 months 
> of it "just working", they can disable the Preconditions for 
> better performance.

Yes, see https://dlang.org/dmd-linux.html#switch-check.


More information about the Digitalmars-d-learn mailing list