Subject: Re: Trouble with CALL/CC
From: rpw3@rigden.engr.sgi.com (Rob Warnock)
Date: 1997/01/30
Newsgroups: comp.lang.scheme
Message-ID: <5cpcet$f5g@tokyo.engr.sgi.com>

Chris Bitmead <Chris.Bitmead@Alcatel.com.au> wrote:
+---------------
| Does lisp have something equivilent to call/cc?
+---------------

Not *exactly* equivalent to full Scheme call/cc, no. But...

1. For "escaping" continuations (using call/cc like C "setjmp/longjmp"),
   CL has several forms: block_label/return, catch/throw, unwind-protect.

2. For emulating a small subset of the "restarting" or "rerunning"
   capabilities of call/cc, see Paul Graham's book "On Lisp", where he
   shows how to write CL macros that give you enough to do, for example,
   non-deterministic searching, or data "generators", etc.

But in general, to get *full* call/cc you'd have to (automatically, one
hopes, with a preprocessor step) rewrite (potentially) your entire CL source
program and all the libraries in "continuation-passing style" (CPS). Not
something to contemplate lightly...


-Rob

-----
Rob Warnock, 7L-551		rpw3@sgi.com
Silicon Graphics, Inc.		http://reality.sgi.com/rpw3/
2011 N. Shoreline Blvd.		Phone: 415-933-1673  FAX: 415-933-0979
Mountain View, CA  94043	PP-ASEL-IA