• 0 Posts
  • 10 Comments
Joined 3 years ago
cake
Cake day: September 24th, 2023

help-circle








  • Not exactly. It means that any of the code could lead to memory unsafety, but it’s still better than Zig or C because you still only have to read 5% of the code to debug/fix those issues, instead of 100%.

    5% is clearly better than 100%. Whatever else you think about this port you can’t argue against that. In fact I can prove that it’s better.

    1. Does Rust’s memory safety design improve memory safety? Yes, this is proven by experience (e.g. see Google’s blog posts).

    2. Does “normal” (not slop) Rust code rely on some unsafe? Yes. All Rust code must use some unsafe because it’s used in the standard library, and even if you ignore that (there is an effort led by Amazon to formally verify it), it’s usual for Rust projects to use at least some unsafe. Let’s say 0.1% of lines.

    3. So 0.1% unsafe is clearly better than 100%. Is it possible for 0.1% unsafe to be better than 100%, but somehow 5% isn’t? That would require things to be non-monotonic which is completely implausible.