Hacker News new | ask | show | jobs
by btrask 3075 days ago
It seems to me that "unsafe" Rust is a subset of Rust as a whole. Unless the Rust language does not support unsafe code at all?
2 comments

"Unsafe" Rust is a superset because everything you can do in normal "safe" Rust, you can do within an "unsafe" block. That is, being within an "unsafe" block (which is what people mean by "Unsafe Rust") allows you to do more, not less.
> It seems to me that "unsafe" Rust is a subset of Rust as a whole.

Sure. When people say "Rust" they usually mean "safe Rust". But if we consider "Rust" as a whole, "Safe Rust", and "Unsafe Rust", then:

Rust is Unsafe Rust

Safe Rust is a subset of Unsafe Rust (and therefore Rust).