News for hackers. Stuff that matters.
Re:Bugs that the Rust compiler catches for you by edflsafoiewq on Friday May 06, 2022 @05:00AM (#31282973)
Panics are exactly like exceptions in the fact the entire standard library pays the cost of being exception safe.
Re:Bugs that the Rust compiler catches for you by roblabla on Friday May 06, 2022 @05:04AM (#31282991)
You can turn panics into aborts with `panic = "abort"` in Cargo.toml, in which case nobody has to pay for being exception safe (though, to get the full benefits of this, you may have to rebuild the stdlib? I'm not entirely sure here).
Re:Bugs that the Rust compiler catches for you by edflsafoiewq on Friday May 06, 2022 @05:21AM (#31283087)
I'm talking about the cost paid by the library author for the additional burden of writing exception safe code. Whether you use this downstream doesn't matter, the cost is already paid (in fact arguments like "no one catches" make it worse since the cost is paid and no one benefits).