[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Coroutines



Dan Weinreb <dlw@exceloncorp.com> writes:

>    Date: Thu, 29 Nov 2001 22:44:36 -0500 (EST)
>    From: Matthias Felleisen <matthias@ccs.neu.edu>
> 
>    Dan, Scheme's call/cc provides the only true full coroutining power in the
>    world.
> 
> Thank you, clearly I need to learn about this.  When was call/cc born?
> What I know about Scheme I mainly learned at MIT in the late 70's, so
> I'm seriously out of date.  I just looked at my 1985 copy of "The
> Structure and Interpretation of Programming Lanaguages" and it doesn't
> seem to be in there, or at least not in the index.

If I recall correctly, cwcc (as such) was born in the early 80s.  It
is essentially a derivative of CATCH.  The earliest versions of Scheme
had a CATCH special form much like MacLisp.  Then I think it was
changed to something that would be analagous to `(WITH-CONTINUATION
(name) body)' where the `catch tag' was eliminated in favor of binding
a special object to a lexical variable.  Sometime in the early 80's
someone noticed that a special form wasn't necessary if the body was a
thunk, and cwcc was born.