Safe method wont check dangling pointer?

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Tue Apr 15 10:40:15 PDT 2014


On 4/15/2014 10:26 AM, bearophile wrote:
> Walter Bright:
>
>> That's what @safe is for.
>
> I think those sanitizers (but the integer-related one) are meant to help D
> programmers catch bugs in @system code.

I understand that. I've written my own sanitizers in the past and used them 
heavily. The big advantage of @safe is that it offers a guarantee, sanitizers do 
not.

Very little, however, of even a hardcore app needs to be @system. What little 
remains is often @system for performance reasons, where you'd turn off a 
sanitizer anyway.

To sum up, a sanitizer for D offers little incremental benefit, and has a 
substantial implementation cost. Such cost would take away from other 
improvements to D that would be far more valuable.



More information about the Digitalmars-d mailing list