Hacker News new | ask | show | jobs
by DSMan195276 4421 days ago
Rust has 'Conditions', which basically allow the current function to run a closure when an error happens which tells it what to do on the error, and then continue the function call. I don't know much Rust or Common Lisp though, so I'm not sure if they're the same thing. Rust's condition functionality definitely doesn't unwind the stack when calling back though, because in Rust unwinding the stack isn't ever allowed because of memory safety issues.
1 comments

Rust's conditions were actually removed. [1] They don't need language support, though, so you could re-add them as a library. When they existed, they were very close to Common Lisp conditions.

1: https://github.com/mozilla/rust/pull/12039