[Scheme-reports] Fwd: Comments on draft 6 about call/cc
Alex Shinn 02 Mar 2012 11:42 UTC
---------- Forwarded message ----------
From: <oleg@okmij.org>
Date: Fri, Mar 2, 2012 at 3:08 AM
Subject: Re: Comments on draft 6 about call/cc
To: alexshinn@gmail.com
Hello!
Thank you for forwarding the messages to the scheme-reports
list! I read the list via the web-accessible digest. I still owe you
the reply to the rest of your big message (I need to deal with a few
deadlines first).
> > There are far bigger practical problems. See the slides of Chung-chieh
> > Shan's ICFP06 talk
> > http://www.cs.rutgers.edu/~ccshan/dynscope/talk.pdf
> >
> > particularly slide 31 and the ones leading to it.
>
> Is that the correct URL? It has only 20 slides.
The URL is correct; however, I should've said PDF page 31 (which is on
slide 13). Because of overlays, one slide corresponds to (many) PDF
pages.
> As a circular example, delimited continuations can't
> implement the call/cc form.
Really? I have pointed the definition, written by Rees, I think, which
has been in Scheme48 since about 1994. Please search for cwcc in
http://www.s48.org/cgi-bin/hgwebdir.cgi/s48-stable/file/c975d6f20901/scheme/misc/shift-reset.scm
(starting line 119).
> This is an artifact of one particular implementation of the REPL. If
> your REPL views the input as a proper stream (as in the following
> simple definition) then it gives the same result as the let-wrapped
> version:
Yet my point still stands: in some Scheme at least call/cc is
delimited at its REPL boundary. Some Scheme systems may let call/cc
capture continuation across REPLs. Yet they would typically delimit
call/cc at session boundaries (I mean the debugging session and
the main session; Chez calls them `Cafe'). Alan Bawden
Reification without Evaluation
Alan Bawden
AI Memo, AIM-946, 1-Jun-1988
http://hdl.handle.net/1721.1/6461
have argued that call/cc-captured continuations should not `shift
levels' (go between sessions), see Sec 3. In modern terms, he
advocated delimited call/cc. I think mane Scheme systems follow his
advice.
BTW, I'd like to comment on John Cowan's comment in
http://lists.scheme-reports.org/pipermail/scheme-reports/2012-February/001918.html
Exception handling has two aspects: first, determining the current
exception handler; second, transferring the control to that handler,
perhaps aborting the current continuation. The problematic
interaction between call/cc and exceptions (which are well-known in
SML/NJ, btw) occur at the phase of determining the exception handler
(and not at the phase of aborting the part of the computation).
Cheers,
Oleg
_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports