4 ms·
That's still not really unique to rust, D (at least) does that too. However, good point nonetheless.
by mhh__ 10y ago
That's still not really unique to rust, D (at least) does that too. However, good point nonetheless.
- steveklabnik 10y agoA big difference is the defaults; Rust made an explicit design decision to make unsafe the default, to mark it with a keyword and to make unsafe a superset of safe. It is totally true that these things aren't unique, but there is a lot of advantage for this specific set of choices in combination.
- staticassertion 10y ago> Rust made an explicit design decision to make unsafe the default You mean 'safe the default'.
- steveklabnik 10y agoYes, whoops!
- nickpsecurity 10y agoC programmers could've had so much fun with that quote. ;)
- burntsushi 10y agoSure, 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