2 ms·
It's a demonstration of the Rust developers putting their money where their mouth is by taking very seriously the notion of memory safety. The C++ approach woul
by kibwen 12y ago
It's a demonstration of the Rust developers putting their money where their mouth is by taking very seriously the notion of memory safety. The C++ approach would be to conclude that misuse of the API to a degree sufficient to cause memory unsafety is an error on behalf of the programmer, and that one should merely be careful. And it's absolutely true, the steps required to violate memory safety in this example are quite contrived. But Rust makes the claim that memory unsafety can't arise outside of an `unsafe` block, and their dedication to upholding that claim is laudable.
- EugeneOZ 12y agothanks for explanation. It should be description to this post, otherwise it looks like mirroring of github issues list to HN.
- dman 12y agoWhy drag C++ into this? The rest of your answer holds up even without the crack at C++.
- kyllo 12y agoBecause if C++ didn't have these problems, Rust wouldn't need to exist in the first place?
- madez 12y agoMaybe because if C++ would have been safer, there would be no Rust. Rust is in direct competition to C++ and aims to be able to replace it completely. Therefore, Rust needs the direct comparison to C++ to show how it's better.