Re: New draft (#8) and last call for comments on SRFI 255: Restarting conditions
Marc Nieper-WiÃkirchen 13 Dec 2024 20:22 UTC
Am Fr., 13. Dez. 2024 um 20:52 Uhr schrieb Marc Nieper-Wißkirchen
<xxxxxx@gmail.com>:
> Then there is a serious problem I haven't thought about before:
> "define-restartable" kills all proper tail calls; if a procedure
> protected by "define-restartable" is part of a recursive algorithm, it
> will never tail-call. This is bad; it should be safe to replace
> "define" with "define-restartable" without changing the semantics. I
> have to think of a solution.
So, the problem is that "with-exception-handler" does not necessarily
call the THUNK argument in tail-context. Neither R6RS nor R7RS
prescribe this (yet), but they should. Tail-context can be guaranteed
when the handler stack is implemented with continuation marks.