News for hackers. Stuff that matters.
Re:Algebraic Effects – You Can Touch This (2019) by xiaodai on Wednesday December 14, 2022 @07:06AM (#33982417)
Is "Conditions and Restarts" related to delimited continuation?
Re:Algebraic Effects – You Can Touch This (2019) by gpderetta on Wednesday December 14, 2022 @08:47AM (#33983375)
as far as I understand, yes.
Re:Algebraic Effects – You Can Touch This (2019) by nerdponx on Wednesday December 14, 2022 @05:06PM (#33991288)
I 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.