On 3/6/2018 12:45 AM, Timon Gehr wrote:
Anyway, "do not use assert" is not the solution, as I have explained many times now.


My interpretation is you want D assert to behave like C assert. C assert and enforce are purely creatures of the library, with semantics defined by their library implementation, and have no effect on the core language.

I recommend creating your own library assert, call it 'check' for example, and give it the semantics you wish. You can even have it expand to nothing for release builds.

Creating library asserts is why D has special support for __FILE__ and __LINE__ like C does, and for the same reasons.

Reply via email to