Re: Desperate Questions: [1]Absolute-Child-Number

Subject: Re: Desperate Questions: [1]Absolute-Child-Number
From: christo@xxxxxxxxxxxxxxxxxx (Frank Christoph)
Date: Thu, 26 Jun 1997 00:01:50 +0900
> Thanks for the reminder. I've heard about CPS transformation (and even
> had the CPS of the Y-combinator memorized at one time) but I would be
> surprised if most DSSSL implementations would do it. My understanding is
> that CPS is typically only used in real compilers and not in
> interpreters. On the other hand, call/cc is a standard part of Scheme,
> (but not DSSSL) so I guess Scheme interpreter writers find a way to
> implement continuations.

Acutally, CPS style is a very popular way of writing interpreters for eager
languages, and it is considerably easier to implement first-class continuations
in an interpreter than in a compiler.  (Then again, it is considerably easier
to implement an interpreter than a compiler, period.)  There are several
compilers, also, that transform the entire program into CPS form and then
emit code based on that representation because it maps very closely onto
the way computers actually work, namely sequentially and with iterative
control constructs.  SML/NJ and several Scheme compilers are implemented
this way.

  -- FC


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread