Antti Huima <firstname.lastname@example.org> 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":
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 Warnock, 31-2-510 email@example.com
SGI Network Engineering <URL:http://reality.sgi.com/rpw3/>
1600 Amphitheatre Pkwy. Phone: 650-933-1673
Mountain View, CA 94043 PP-ASEL-IA