from spam thread (move here anon instead of conversing with retards like the one who replied to you):
>This is only a logic error in the sense that they needed to mentally maintain the logic to keep track of mutability and memory bounds. A language problem.
To expand on that, and beyond the "direct" safety features, Rust (and more languages in the future hopefully) offer abstractions and type system features that model invariants in a much cleaner way, from sum types to type classes to RAII, not to mention extensive pattern support and "everything is an expression".
but even if you end up with boolean conditions somehow. you can always go with a "truth table" match (i do), where you can't "forget" any branches.
// usually it's not just bools, but that's where patterns come handy
match (cond1, cond2, cond3) {
(false, false, false) => ...,
// all 7 remaining "branches", otherwise it's a compile error
}
in that, you can also make supposedly non-existing combinations "unreachable!()", so you hopefully pre-catch any potential room for a future vulnerability.
tl;dr: merely having idiomatic exhaustive checking wins you a lot.