[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CPS in Parrot

>>>>> "Matthias" == Matthias Felleisen <matthias@ccs.neu.edu> writes:

Matthias> Dan is right when he says that we shouldn't think of them as
Matthias> plain functions and Scheme may have made a mistake there.

The main mistake is not in using procedures per se (even though it
probably *is* a mistake), but rather with calling these procedures
themselves "continuations"---for Scheme's definition of
CALL-WITH-CURRENT-CONTINUATION, the name is wrong.  It should be
called CALL-WITH-ESCAPE-PROCEDURE.  You're saying much the same thing
further down, but coming down on the other side of the coin:

Matthias>   callcc -- creates an opaque continuation object and hands
Matthias>   it over to some function
Matthias>   throw -- is the only primitive operation that can consume such a
Matthias> "thing" and do something
Matthias>     with it.

So, terminology-wise:

- continuation: abstract object representing the control context
- escape procedure: procedure that throws away current control context
  and replaces it by another, previously captured one

Consistently using this terminology greatly helps with explaining
these issues.

Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla