Continuation marks and SRFI 198 Lassi Kortela 16 Aug 2020 11:29 UTC
> The systematic way to maintain frame information is given by > continuation marks (Racket, SRFI 157, and Racket's modification of > Chez Scheme ). This is the portable equivalent to stack inspection > for languages with tail calls and call/cc (, , ...). > > An elegant solution would be if SRFI 198 defines a continuation mark > key (see also the addendum to SRFI 157 in SRFI 154), whose value is > extracted whenever an error object is constructed. Such a key can > either be set with "with-continuation-mark", which works also in the > presence of tail calls and call/cc, or by the implementation whenever > a SRFI 170 procedure is being entered. > > I understand that only a few Schemes support continuation marks yet, > but whatever solution will finally be proposed to SRFI 198, there > should be an upgrade path to the use of continuation marks, which is > "the right way". That sounds great. SRFI 198 and 170 need to be usable even on tiny Schemes, so 198 must be able to provide all the usual features without continuation marks. Even it seems wise to make retrieving the Scheme procedure name optional, it would be nice to store it in a way that works even without continuation marks, simply by the implementation manually storing a symbol in the object. However, tying 198 seamlessly into a continuation marks system would definitely be the right thing. Marc, can you suggest us an API for that? I for one won't be able to learn the topic fast enough.