4 ms·
If you use the GC (and don't go out of your way to hide pointers/references from it) it's as memory-safe as any GC'ed language. If you avoid the GC and do your
by MrRadar 7y ago
If you use the GC (and don't go out of your way to hide pointers/references from it) it's as memory-safe as any GC'ed language. If you avoid the GC and do your memory management manually you at least have RAII so it shouldn't be any less safe than C++. D also includes some (experimental?) language features which aim to improve memory safety[1] but they're nowhere near as robust as Rust's type system.
[1] https://dlang.org/spec/memory-safe-d.html https://dlang.org/spec/memory-safe-d.html