Hacker News new | ask | show | jobs
by dgfgfdagasdfgfa 3287 days ago
How is D's memory safety without the GC? How does it guarantee you don't use-after-free, de-ref nulls, buffer overflow, etc?
2 comments

Great question! The answer is a bit more than a simple reply can do, so:

Pointers Gone Wild: Memory Safety and D http://dconf.org/2017/talks/bright.html

It seems like use-after-free is still a potential issue, even with those guard rails. Rust deals with those through named lifetimes --would those ideas be useful in D as well?
Walter, you're always so responsive in these threads! Cheers.
This is being worked on, but there is already memory safety checks implemented in the compiler (That one can use now) "-dip1000"