On Saturday, 1 September 2018 at 20:15:15 UTC, Walter Bright wrote:

Note the "may or may not be evaluated." We've debated this here before. I'm rather pleased that John agrees with me on this. I.e. the optimizer can assume the expression is true and use that information to generate better code, even if the assert code generation is turned off.

Is the part about the optimizer true in D's case? Or is this just a theoretical advantage to using asserts that are not evaluated in production code but left in?

Reply via email to