SHORT Re: Suggestion: "fix" assert(obj)

Georg Wrede georg at nospam.org
Fri Jun 15 13:43:13 PDT 2007


Walter Bright wrote:
> Kristian Kilpi wrote:
> 
>> The problem is that
>>
>>   assert(obj);
>>
>> does not first check if 'obj' is null.
> 
> 
> Yes it does, it's just that the hardware does the check, and gives you a 
>  seg fault exception if it is null.

Asserts were INVENTED to *avoid segfaults*.



More information about the Digitalmars-d mailing list