News for hackers. Stuff that matters.
Re:Several core problems with Rust by josefx on Monday November 24, 2025 @04:19AM (#46031997)
Sys exit does not crash. It raises a SystemExit exception, which can be caught on any layer above it. Given that python uses exceptions for trivial things like loop termination this can be considered normal flow control.
Re:Several core problems with Rust by Measter on Monday November 24, 2025 @09:03AM (#46034214)
And, by default, panicking in Rust also doesn't crash, it begins a stack unwind which can be caught on any layer above it with catch_unwind.
Re:Several core problems with Rust by bccdee on Tuesday November 25, 2025 @01:42PM (#46049158)
Yeah, and in Rust you can catch the panic from `unwrap()` with panic::catch_unwind. You just don't, for the same reason you don't catch SystemExits. If a SystemExit is being thrown, it's because you want to crash; if you don't wan to crash, don't throw a SystemExit.