From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bakul Shah Newsgroups: gmane.emacs.help Subject: Re: The fundamental concept of continuations Date: Mon, 08 Oct 2007 23:07:34 -0700 Organization: Sonic.Net Message-ID: <470b1aa6$0$79886$742ec2ed__33716.8773789473$1191912604$gmane$org@news.sonic.net> References: <1191906949.179197.217470@57g2000hsv.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1191912599 25222 80.91.229.12 (9 Oct 2007 06:49:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 9 Oct 2007 06:49:59 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Oct 09 08:49:57 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1If8ue-0004gs-OY for geh-help-gnu-emacs@m.gmane.org; Tue, 09 Oct 2007 08:49:53 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1If8uY-0000UX-Uq for geh-help-gnu-emacs@m.gmane.org; Tue, 09 Oct 2007 02:49:47 -0400 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!news.osn.de!diablo1.news.osn.de!feeder.erje.net!news-xfer.nntp.sonic.net!posts.news.sonic.net!nnrp0.nntp.sonic.net!not-for-mail User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) Original-Newsgroups: comp.lang.scheme, comp.lang.lisp, comp.lang.functional, gnu.emacs.help, comp.lang.python In-Reply-To: <1191906949.179197.217470@57g2000hsv.googlegroups.com> Original-Lines: 44 Original-NNTP-Posting-Date: 09 Oct 2007 06:07:34 GMT Original-NNTP-Posting-Host: 95b25a0e.news.sonic.net Original-X-Trace: DXC=G[Q3F5QXj6Tc>C@bgAFihVm4K\QM1CV^P1OYf0H`?; XQMl[kS6aem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:48242 Archived-At: 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