[Info-vax] Rust as a HS language, was: Re: Quiet?

plugh jchimene at gmail.com
Tue Apr 5 09:21:29 EDT 2022


To follow up on the UB focus:

"Undefined behavior is still possible in Rust, if using unsafe keyword6, but it's almost eliminated in the safe subset of Rust. That's a major part of why the Rust language is so amenable to writing correct, reliable software. Rust removes UB, nearly entirely, by default.
    Why the "almost eliminated" and "nearly entirely" caveats?
    At the time of this writing, Rust does not yet have an official language standard or specification, like C or C++. So it's difficult to make a definitive claim.
    The Rust Reference contains a non-exhaustive list of behaviors considered undefined in Rust6, all of which would require the unsafe keyword to introduce. So there are likely only two potential sources of UB in Rust:
        unsafe blocks whose invariants aren't actually upheld (our fault).
        Rare compiler bugs7 that threaten soundness (patched once discovered)."
-- https://highassurance.rs/chp3/undef.html



More information about the Info-vax mailing list