3 ms·
Note to the reader: the article talks about modeling the Common Lisp condition system which is more general than an exception system. In an exception system, w
by gumby 5y ago
Note to the reader: the article talks about modeling the Common Lisp condition system which is more general than an exception system.
In an exception system, when you signal a condition (“throw”) the stack is unwound until the exception is caught or the stack exhausted.
In a general condition system the stack is searched for a handler; that handler is free to return (at which point the stack is unwound, and then the handler exits, same as catching an exception) or continue (e.g. free some disk space and then have the write operation retry, or return infinity from a divide by zero error).
- steveklabnik 5y agoFun fact: at one point in Rust's history, it too had conditions. They ended up being removed well before 1.0.
- agumonkey 5y agowas is too costly (memory/instr) or too difficult to model/type properly ?
- steveklabnik 5y agohttps://github.com/rust-lang/rust/issues/9795 https://github.com/rust-lang/rust/issues/9795 and the various things linked from it (prs, commits, etc) are the best way to get the context.