More evidence that memory safety is the future for programming languages

Dukc ajieskola at gmail.com
Tue Mar 31 23:08:01 UTC 2020


On Monday, 30 March 2020 at 13:20:08 UTC, Atila Neves wrote:
>
> It's easier to use asan with ldc. I did write an allocator to 
> do this before asan was available though: 
> https://github.com/atilaneves/test_allocator

Yeah, something like those is what I meant. Thanks - I have to 
remember those when next having problems with `malloc`s.

Lowering the bar to use a tool like these is IMO more effective 
than pushing Rust-like static analysis. Basically, to cut down 
memory problems a sanitizer should be as easy to use as the 
built-in `unittest`s. Sure static checks can be useful too, but 
to be worth it they need to be easier to use than the sanitizer, 
and in any case static checks can't completely replace sanitizers.


More information about the Digitalmars-d mailing list