Subject: Re: continuations are mandatory for compilers?
From: (Rob Warnock)
Date: 24 Dec 2001 06:20:05 GMT
Newsgroups: comp.lang.scheme
Message-ID: <a06hel$2l8gd$>
William D Clinger <> wrote:
| Fabien Letouzey asked:
| > That is, is the compilation process tightly bound with continuations,
| > making them a mandatory step?
| No.  Although there is some interaction between continuations and
| compilers, there isn't much.

Also see:

	Flanagan, Sabry, Duba and Felleisen
	"The Essence of Compiling with Continuations"

which introduces "A-Normal Form" (ANF), a transformation on source
code which allows a direct-style compiler many of the benefits of
the traditional CPS transformation without having to deal with CPS.

[Actually, ANF can be quite useful to a "fast interpreter" or "half-
compiler", too, one that's already doing a pre-pass to rename lexical
variables and/or convert lexical environments to either "flat" or
"display/offset" style.]

From a very quick look around, this appears to still be an area of
active study, with more alternative to CPS than just ANF. See
<URL:> for a number
of other papers which deal with these issues.


Rob Warnock, 30-3-510		<>
SGI Network Engineering		<>
1600 Amphitheatre Pkwy.		Phone: 650-933-1673
Mountain View, CA  94043	PP-ASEL-IA

[Note: and aren't for humans ]