3 ms·
No, you can't build safe abstractions in C++. The language lacks the ability to enforce memory safety. Every abstraction you can come up with will have some way
by pcwalton 7y ago
No, you can't build safe abstractions in C++. The language lacks the ability to enforce memory safety. Every abstraction you can come up with will have some way to subvert it. In Rust, the abstractions can't be broken without using unsafe, which application logic should never use.
This isn't just a theoretical distinction. Empirically, Rust programs have far fewer memory safety problems than C++ programs do.