assert and enforce both compiled out with -release

rjframe dlang at ryanjframe.com
Sun Jan 28 13:28:00 UTC 2018


On Sun, 28 Jan 2018 00:59:12 +0000, lobo wrote:

> On Saturday, 27 January 2018 at 22:53:37 UTC, Ali Çehreli wrote:
>> On 01/27/2018 10:33 AM, kdevel wrote:
>>
>>> I suggest the deletion of the sentence "Use assert in contracts."
>>
>> Done.
>>
>> Ali
> 
> Wait, no this isn't right, is it? Enforce should not be used in
> contracts so the "Use assert in contracts" statement is correct and
> should remain. I think the issue here is the OP is getting confused
> between assert vs. exception.

Without that statement, the documentation is still pretty clear that you 
shouldn't use enforce in contracts, so removing it won't hurt anything, 
and does make things clearer by staying on-topic.


More information about the Digitalmars-d-learn mailing list