Earlier quoted context omitted.
It's non-local control flow with deterministic unwinding and defined stop points. It's an exception system. Sure, it's not "recommended", but recommendations don't define semantics.
I'd say they do—a Rust user will never encounter a panic from a reasonable library that they're expected to catch. If hypothetical unreasonable libraries are in scope, they can just open /proc/self/mem for writing (in safe Rust!) and violate memory safety, and that's not an argument that Rust isn't memory safe. So why should hypothetical unreasonable libraries be an argument that Rust has exceptions?
Redox OS Crash Challenge
81–82 of 82 posts
Re: Redox OS Crash Challenge
#82Earlier quoted context omitted.
I'd say they do—a Rust user will never encounter a panic from a reasonable library that they're expected to catch. If hypothetical unreasonable libraries are in scope, they can just open /proc/self/mem for writing (in safe Rust!) and violate memory safety, and that's not an argument that Rust isn't memory safe. So why should hypothetical unreasonable libraries be an argument that Rust has exceptions?
Because the language doesn't define what happens if you write to memory behind the runtime's back. It _does_ define, in detail, what occurs on panic. It's a legal thing to do. That some consider panicing in bad taste or whatever does not change the fact that panic is a supported feature of the language.