[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: So, what the heck is a continuation anyway?
Generally speaking, when you call a function, your program explicitly
says "evaluate this function with such-and-such arguments". The
interpreter translates this to "evaluate this function with
such-and-such arguments, and return the value and the control of
further execution to *here*."
That "*here*" is the continuation. If the programmer can get explicit
control of the continuation, then he or she can do perv^H^H^H^Hinteresting
things, since a function can return values to somewhere other than its
_Lisp In Small Pieces_ has an excellent discussion of continuations,
and how they interact with other control structures, from an
implementor's point of view.
"If I don't know what I'm doing, I program in Scheme. If I don't want to be
allowed to not know what I'm doing (possibly for the sake of efficiency or
safety), I program in SML. If I want to get paid, I program in C++."
== Seth Gordon == email@example.com == http://ropine.com/ == std. disclaimer ==