(no title)
autoreleasepool | 4 months ago
C and Zig have a big advantage for writing maintainable, easy to read unsafe code over unsafe Rust.
autoreleasepool | 4 months ago
C and Zig have a big advantage for writing maintainable, easy to read unsafe code over unsafe Rust.
rstuart4133|4 months ago
All true.
> and has poorly defined rules.
The rules aren't so poorly documented. The options for working with/around them, like say using UnsafeCell, do seem to be scattered across the internet.
But you omitted a key point: unlike C and Zig, unsafe code in Rust is contained. In the Rust std library for example, there are 35k functions, 7.5k are unsafe. In C or Zig, all 35k would be unsafe. If you are claiming those 35k unsafe lines in C or Zig would be easier to maintain safely than those 7.5k lines of unsafe Rust, I'd disagree.
vacuity|4 months ago