3 ms·
Is "Conditions and Restarts" related to delimited continuation?
by xiaodai 4y ago
Is "Conditions and Restarts" related to delimited continuation?
- gpderetta 4y agoas far as I understand, yes.
- nerdponx 4y agoI believe restarts are a special case of invoking a continuation. The difference in Lisp is that you can't actually capture and pass around the continuation as a first class object, like you can in Scheme, and I don't believe there is a way to invoke more than one restart for a given condition. I think this limited special case covers the majority of what people would want to do with continuations, and prevents people from doing the messy stuff that you shouldn't be doing anyway. From what I recall, the new algebraic effects system in OCaml has similar limitations (you can only invoke the continuation once), and I think Koka has a special case for it in their compiler & encourages it.