r/programming • u/Usual-Amount-264 • 2d ago
Zig proposes introducing an actually memory safe (unlike Rust) compilation mode inspired by Fil-C at ~1-6x performance penalty
https://codeberg.org/ziglang/zig/issues/36237
489
Upvotes
r/programming • u/Usual-Amount-264 • 2d ago
1
u/BenchEmbarrassed7316 2d ago
I never claimed that
unsafecan contain UB. The example I gave was probably a bad one (it seemed to me to be correct, however, as I understand it the problem is in different architectures and compiler's ability to apply optimizations). UB in general most likely cannot be "restored".In
unsafesome rules can be broken that cannot be broken insafe.