2 ms·
> in the same way that "safe" Rust is a usable (if difficult to get used to) subset of "unsafe" Rust Where did you get this idea that "safe" Rust is a subset o
by none_for_me_thx 10y ago
> in the same way that "safe" Rust is a usable (if difficult to get used to) subset of "unsafe" Rust
Where did you get this idea that "safe" Rust is a subset of "unsafe" Rust? Your whole premise here perhaps qualifies as not even wrong: this is not how safety in Rust is conceived or conceptualized.
- duneroadrunner 10y agoYeah, that's my point. Even though, unlike C++, (safe) Rust was designed to be (memory) safe from the start, it's notable that Rust and C++ end up (or will soon end up) in the same place - a "usable" safe language and an unsafe superset of that language. It's notable because before C++11, memory safe subsets of C++ could be considered not really "usable". But since the advent of C++11, there are memory safe subsets of C++ that are comparable to Rust in usability and performance [1]. [1] https://github.com/duneroadrunner/SaferCPlusPlus#safercplusplus-versus-rust https://github.com/duneroadrunner/SaferCPlusPlus#safercplusp...
- none_for_me_thx 10y agoI should have said I think you are operating under false assumptions, are making invalid comparisons, and are therefore drawing unwarranted conclusions. I think you might be confused about what Rust offers and from where Rust's safety is derived. There is no "safe subset" of Rust. As far as I know, that is a nonsense phrase.
- dbaupp 10y agoI think nonsense is rather too strong: Rust-banning-`unsafe` is a subset of the full language accepted by the compiler, and is safe. It isn't rare that people talk about the subset of Rust ignoring `unsafe`.
- steveklabnik 10y agoUsually, we describe unsafe rust as a superset of safe Rust. that is, unsafe Rust is exactly like safe Rust, but gives you extra things.