Am Do., 22. Juni 2023 um 23:21 Uhr schrieb Philip McGrath
<xxxxxx@philipmcgrath.com>:
>
> Hi,
>
> >
> > I've been learning about continuation marks so that I can implement
> > them in MIT/GNU Scheme, and I've run across some things I'd like to
> > discuss. There are two things: the first is my understanding of the
> > underlying model, which seems to be different from the one presented;
> > the second is some quirks about the interface.
> >
>
> I just read this SRFI for the first time, and I don't consider myself an
> expert on the semantics of continuation marks, but I happened to hear of
> your message in a Racket chat, and I mostly wanted to suggest asking on
> <https://racket.discourse.group>: many people there are more qualified
> than I am to answer, including John Clements and Matthew Flatt, who
> invented continuation marks, and Jay McCarthy, who advised the master's
> thesis setting out the implementation strategy in the SRFI sample code.
I, the author of this SRFI, have already answered Chris. As I noticed
now, I forgot to send the answer to the list as well. I am forwarding
it.
> Note that the SRFI ommits the procedure CONTINUATION-MARKS, which makes
> this more useful: CONTINUATION-MARKS extracts marks from a reified
> continuation, so CURRENT-CONTINUATION-MARKS becomes equivalent to:
>
> (call/cc continuation-marks)
>
> (The SRFI also omits CONTINUATION-MARK-SET->ITERATOR, a variant of
> CONTINUATION-MARK-SET->LIST* that may have better time complexity,
> especially if early termination is possible.)
>
> >
> > Second, two different names are used for the set of continuation
> > marks. The procedure CURRENT-CONTINUATION-MARKS retrieves them, and
> > CONTINUATION-MARKS? tests for such an object. But when interrogating
> > the sets, CONTINUATION-MARK-SET->*** are used. So what does the
> > latter mean? Is CONTINUATION-MARK-SET an alias for
> > CONTINUATION-MARKS, or is it saying that the parameters specify a
> > subset of the marks and the procedure is returning those? And if the
> > latter, it seems that the procedure CONTINUATION-MARK-SET->LIST*
> > should be called CONTINUATION-MARK-SETS->LISTS.
These procedures are all in SRFI 226; SRFI 157 should be considered
obsolete by now.
> The names in Racket are confusing. In Racket's branch of Chez Scheme,
> names containing MARK-SET were changes to just say MARKS, since the
> value in question is not a set data structure. See Racket commit
> fc81924cbee7a07fe76aa1c9c2b76d0dfde8d6be or commit
> 2eedc888b06f6223be15cc800107d468e7dd33ef to
> <https://github.com/racket/ChezScheme> for more discussion. With the
> renaming, the procedure names become:
>
> - with-continuation-mark
> - continuation-marks?
> - current-continuation-marks
> - continuation-next-marks [Racket's continuation-marks]
> - continuation-marks-first
> - continuation-marks->list
> - continuation-marks->iterator
> - call-with-immediate-continuation-mark
Thanks for this list; should SRFI 226 become part of a future RnRS,
the same change should be made.