[plt-scheme] continuation in top level begin form

From: Jacob Matthews (jacobm at cs.uchicago.edu)
Date: Fri Aug 4 15:14:35 EDT 2006

I am 100% stunned that you noticed this :)

In fact this discrepancy is known, was deliberately introduced to 
DrScheme very recently, and is intentional (in a manner of speaking).

Robby and I have been looking into the interaction between top-level 
begin and continuations, and we concluded that mzscheme did it wrong. 
Robby fixed the interaction in DrScheme's debugging modes (where it 
turned out to be easy to fix), but it is not yet fixed for the 
non-debugging modes.

-jacob

Jos Koot wrote:

> Hi,
> The results of the following are different for debugging on/off.
>
> (begin
> (define cc (let/cc cc cc))
> (display "once or twice?\n")
> (if (procedure? cc) (cc 'aap) 'end))
>
> Results without debugging.
> Welcome to DrScheme, version 352.2-svn3aug2006.
> Language: Textual (MzScheme, includes R5RS) custom.
> once or twice?
> once or twice?
> end
>
> Results with debugging:
> Welcome to DrScheme, version 352.2-svn3aug2006.
> Language: Textual (MzScheme, includes R5RS) custom.
> once or twice?
>
> I think R5RS prescribes 'twice', whereas mzscheme's language manual 
> section 2.8.5 prescribes 'once', assumming the continuation of a top 
> level form pointing to the print phase of the read eval print loop.
> It does not bother me too much, but I think this discrepancy between 
> debugging/no debugging is not intended. (Please, do not remove the 
> lifting of the body expressions of begin forms, for that's a good 
> idea, I think)
> Best wishes, Jos Koot.
>
>
>
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>



Posted on the users mailing list.