assume, assert, enforce, @safe
simendsjo via Digitalmars-d
digitalmars-d at puremagic.com
Thu Jul 31 00:01:37 PDT 2014
On 07/31/2014 12:01 AM, Walter Bright wrote:
(...)
> 2. The compiler can make use of assert expressions to improve
> optimization, even in -release mode.
(...)
Does this mean that assertions used for optimization will be left in
-release? There's plenty of times where I've had an old incorrect
assertion in my code after a refactoring - sometimes in seldom used paths.
If the compiler would aggressively optimize my code based on some wrong
assumptions I give it, it would be very useful if that assumption would
stay in the code to trigger an assertion.
More information about the Digitalmars-d
mailing list