|
call/cc necessitates dynamic-wind?
Eleanor Bartle
(01 Jan 2026 03:24 UTC)
|
||
|
Re: call/cc necessitates dynamic-wind? Marc Nieper-Wißkirchen (01 Jan 2026 12:48 UTC)
|
||
|
(missing)
|
||
|
(missing)
|
||
|
Re: call/cc necessitates dynamic-wind?
Eleanor Bartle
(02 Jan 2026 14:35 UTC)
|
||
|
Re: call/cc necessitates dynamic-wind?
Marc Nieper-Wißkirchen
(02 Jan 2026 15:07 UTC)
|
||
|
Re: call/cc necessitates dynamic-wind?
Eleanor Bartle
(03 Jan 2026 00:09 UTC)
|
||
|
Re: call/cc necessitates dynamic-wind?
Marc Nieper-Wißkirchen
(03 Jan 2026 09:36 UTC)
|
||
|
Re: call/cc necessitates dynamic-wind?
Eleanor Bartle
(04 Jan 2026 23:01 UTC)
|
||
|
Re: call/cc necessitates dynamic-wind?
Marc Nieper-Wißkirchen
(09 Jan 2026 10:14 UTC)
|
||
|
Re: call/cc necessitates dynamic-wind?
Marc Nieper-Wißkirchen
(02 Jan 2026 08:49 UTC)
|
||
|
Re: call/cc necessitates dynamic-wind?
Marc Nieper-Wißkirchen
(02 Jan 2026 10:58 UTC)
|
||
Hi! Thanks for the question. The model of SRFI 248 (which is deliberately simple and basic but rich enough to build more complex abstractions on top of it) is that there is basically just one type of effect. Whatever effect is raised, the innermost handler is called (and can move control to the next enclosing handler by reraising the effect), so one can detect every unwinding of the stack through ‘with-unwind-handler’/‘raise-continuable’ and thus implement a version of ‘dynamic-wind’ that works for delimited continuations. With delimited continuations, ‘call/cc’ is not really necessary any more (except for backward compatibility). As the unwinding occurring from instantiating a continuation K captured by ‘call/cc´ does not trigger any unwind handler, one still needs the legacy ‘dynamic/wind’ as long as the legacy ‘call/cc’ exists. One could amend SRFI 248 by integrating ‘call/cc’ fully by demanding that instantiating K raises a condition object, which leads to triggering the unwind handlers. This is less conservative but probably The Right Thing. Marc Am Do., 1. Jan. 2026 um 04:24 Uhr schrieb Eleanor Bartle <xxxxxx@eleanor-nb.com>: > > Apologies for the noise. I’m a passive nerd, attempting to understand Scheme internals, enamoured by delimited continuations. > > One thing I don’t understand in this SRFI is how it would be able to dispense with dynamic-wind, were it not for call/cc. How does that come about? More precisely, why does the unwinding/rewinding of a delimited continuation not necessitate dynamic-wind, and why does that reason not apply to call/cc? > > Eleanor