Subject: Re: call/1cc and call-with-exit-continuation
From: (Rob Warnock)
Date: 17 May 2001 02:11:09 GMT
Newsgroups: comp.lang.scheme
Message-ID: <9dvbvt$8uo1a$>
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":

	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
SGI Network Engineering		<URL:>
1600 Amphitheatre Pkwy.		Phone: 650-933-1673
Mountain View, CA  94043	PP-ASEL-IA