Antti Huima <huima@localhost.localdomain> wrote:
+---------------
| Another way to reduce the potential overhead of continuations would be
| to capture an `exit continuation'...
| Is there some other name for this construct? Do you know of Scheme
| systems that support it? Has it been found useful?
+---------------
MzScheme provides "escape continuations":
<URL:http://www.cs.rice.edu/CS/PLT/packages/doc/mzscheme/node86.htm>
...
In addition to regular call/cc, MzScheme provides
call-with-escape-continuation (or call/ec) and let/ec.
A continuation obtained from call/ec can only be used to
escape back to the continuation; i.e., an escape continuation
is only valid when the current continuation is an extension
of the escape continuation. The application of call/ec's
argument is not a tail call.
Escape continuations are provided for two reasons: 1) they
are significantly cheaper than full continuations; and
2) full continuations are not allowed to cross certain
boundaries (e.g., error handling) that escape continuations
can safely cross.
"Let/ec" allows a style somewhat like Common Lisp's "catch/throw".
-Rob
-----
Rob Warnock, 31-2-510 rpw3@sgi.com
SGI Network Engineering <URL:http://reality.sgi.com/rpw3/>
1600 Amphitheatre Pkwy. Phone: 650-933-1673
Mountain View, CA 94043 PP-ASEL-IA