[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: The fundamental concept of continuations
From: |
Bakul Shah |
Subject: |
Re: The fundamental concept of continuations |
Date: |
Mon, 08 Oct 2007 23:07:34 -0700 |
User-agent: |
Thunderbird 2.0.0.6 (Macintosh/20070728) |
gnuist006@gmail.com wrote:
> Again I am depressed to encounter a fundamentally new concept that I
> was all along unheard of.
The concept is 37 years old. Wadsworth in his "Continuation
Revisited" paper says he & Strachey were struggling with
extending the technique of denotational semantics to describe
jumps and not finding a satisfactory answer. Then, in his
words:
in October 1970 Strachey showed me a paper "Proving
algorithms by tail functions" by Mazurkiewicz [2] which he
had obtained from an IFIP WG2.2 meeting. Just the phrase
"tail functions" in the title was enough -- given the
experience of our earlier struggles -- for the ideas to
click into place! The (meaning of the) "rest of the program"
was needed as an argument to the semantic functions -- just
so those constructs that did not use it, like jumps, could
throw it anyway. The term "continuation" was coined as
capturing the essence of this extra argument (though I
often wished to have a shorter word!) and the rest, as they
say, is history.
> Its not even in paul graham's book where i
> learnt part of Lisp. Its in Marc Feeley's video.
>
> Can anyone explain:
>
> (1) its origin
> (2) its syntax and semantics in emacs lisp, common lisp, scheme
> (3) Is it present in python and java ?
> (4) Its implementation in assembly. for example in the manner that
> pointer fundamentally arises from indirect addressing and nothing new.
> So how do you juggle PC to do it.
> (5) how does it compare to and superior to a function or subroutine
> call. how does it differ.
>
> Thanks a lot.
>
> (6) any good readable references that explain it lucidly ?
You might like this one:
http://www.intertwingly.net/blog/2005/04/13/Continuations-for-Curmudgeons