[racket] begin vs +
Call/cc captures all required variables needed for its continuation, but it
does not capture their states. How about a variable bound to a box that have
been captured in a continuation? Alter the content of the box and call the
continuation. It sees the very same box with the new content. Calling a
continuation does not undo side effects.
Jos
> -----Original Message-----
> From: users-bounces at racket-lang.org
> [mailto:users-bounces at racket-lang.org] On Behalf Of Keiko Nakata
> Sent: 02 August 2010 16:10
> To: matthias at ccs.neu.edu
> Cc: users at racket-lang.org
> Subject: Re: [racket] begin vs +
>
> I may think how call/cc should deal with delay's
> (call-by-need) is a moot point (theory vs implementation).
>
> Keiko
>
> From: Matthias Felleisen <matthias at ccs.neu.edu>
> Subject: Re: [racket] begin vs +
> Date: Mon, 2 Aug 2010 10:00:39 -0400
>
> >
> > call/cc captures the environment when it creates a
> procedural representation of the continuation, just like
> lambda. The two are doing more or less the same thing with
> two differences:
> >
> > (1) lambda uses an explicit expression to create a procedure while
> > call/cc uses an implicit expression (the current evaluation
> context);
> >
> > (2) lambda create a mathematical abstraction if the
> expression avoids effects and call/cc introduces an effect
> into its procedure (abort).
> >
> > Note, a functional continuation creator (say F but NOT
> shift) avoids the second difference.
> _________________________________________________
> For list-related administrative tasks:
> http://lists.racket-lang.org/listinfo/users