a suggestion re: call/cc Jim Rees (09 Jan 2023 11:58 UTC)
Re: a suggestion re: call/cc Marc Nieper-Wißkirchen (09 Jan 2023 14:19 UTC)

Re: a suggestion re: call/cc Marc Nieper-Wißkirchen 09 Jan 2023 14:19 UTC

The idea of the default continuation prompt *is* that the ordinary
call/cc can be delimited earlier than at the REPL prompt (or the OS
command line).

So the message is: Don't use the default continuation prompt if you
don't want to interfere with the classical call/cc but want to
construct something orthogonal to it.

Am Mo., 9. Jan. 2023 um 12:58 Uhr schrieb Jim Rees <xxxxxx@gmail.com>:
>
> The spec implies, though does not say explicitly, that call/cc can be implemented as follows:
>
> (define (call/cc f)
>    (call-with-non-composable-continuation f (default-continuation-prompt-tag)))
>
> However, the presence of any use of call-with-continuation-prompt with the default tag interferes with the usual expected operation of call/cc.
>
> So to keep people from shooting themselves in the foot and preserve the classic behavior of call/cc, my suggestion is to specify that call/cc use a private tag inaccessible to the user, and that in addition to the default tag, a prompt with the call/cc-private-tag be established at the start of every thread.
>