https://issues.dlang.org/show_bug.cgi?id=23996
--- Comment #5 from Bolpat <[email protected]> --- (In reply to elpenguino+D from comment #1) > I think assert(expr) could provide this functionality. Maybe with a > -checkaction=assume switch? It would also work for contracts, invariants, > etc then, while also making it trivial to test the assumptions. I’d say this is really bad design. An assertion and an assumption mean totally different things. With a compiler flag, you control all of them at once. Just for an example, an assumption can be used to inform the compiler about a truth that its optimization routines can make use of and that its optimization routines could not figure out themselves. An assert might be used to validate function input, e.g. `isPrime(int x)` might `assert(x > 0)`. --
