Program logic bugs vs input/environmental errors
eles via Digitalmars-d
digitalmars-d at puremagic.com
Sun Nov 9 14:00:33 PST 2014
On Sunday, 9 November 2014 at 21:59:19 UTC, eles wrote:
> On Sunday, 9 November 2014 at 21:34:05 UTC, Walter Bright wrote:
>> On 11/7/2014 7:00 AM, Bruno Medeiros wrote:
>
>> assert() is for bug detection, detecting state that should
>> have never happened. By definition you cannot know it is
>> "safe", you cannot know what caused it.
>>
>> enforce() is for dealing with known, expected conditions.
>
> This is clear. The missing piece is a way to make the compile
> enforce that use on the user.
>
> Code review alone does not work.
This is clear. The missing piece is a way to make the compiler
enforce that separate use on the user.
Code review alone does not work.
More information about the Digitalmars-d
mailing list