3 ms·
Sure, it's not strictly unique. There are very few language features in any language that are unique. Language design is an evolutionary process. I wish I knew
by burntsushi 9y ago
Sure, it's not strictly unique. There are very few language features in any language that are unique. Language design is an evolutionary process. I wish I knew D better so I could provide a better comparison, but if I am to believe[1] and allow myself to wave my hands a bit, then there's a lot more you can do in safe Rust than in safe D. That's important, because if you wind up needing `unsafe` a lot, then you start to lose the possibility of buttoning up a small amount unsafe code behind a safe interface. (This is NOT to say that D's feature here is worthless, but the languages have very different designs and very different trade offs.)
Steve's point is also pertinent. Safe Rust is the default, so it's very easy to audit for places in your code that need extra care.
[1] - https://dlang.org/spec/memory-safe-d.html https://dlang.org/spec/memory-safe-d.html