2 ms·
> Which means you cannot guaranty your program doesn't exhibit memory unsafely unless you stumble upon it during testing. Right, if you disable those checks.
by pron 6y ago
> Which means you cannot guaranty your program doesn't exhibit memory unsafely unless you stumble upon it during testing.
Right, if you disable those checks.
> Calling it “memory-safe”, is dishonest.
The language is (or will be) memory safe, at least its safe parts -- C/C++ aren't. True, that safety can be disabled selectively. Yes, there can then be undefined behaviour if you disable that safety, but so can Rust when you disable safety selectively. The design is just different. Just remember that using a language with sound guarantees is no one's goal. The goal is to produce programs without bugs. Sound guarantees in the language is one approach toward that goal; there are others.
Generally, guaranteeing that some set of bugs cannot happen does not necessarily guarantee fewer bugs overall; in fact the opposite might be true. Nobody knows if Zig's strong safety story yields to more correct programs that Rust's, but nobody knows the opposite, either. There are good arguments either way but little data. In any event, Zig is much safer than C, even with ASAN.
- littlestymaar 6y ago> The language is (or will be) memory safe. We've been going full cicle here, so I'm not interested in spending more time in this conversation.