help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: The fundamental concept of continuations


From: David Kastrup
Subject: Re: The fundamental concept of continuations
Date: Wed, 10 Oct 2007 12:49:58 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

gnuist006@gmail.com writes:

> Again I am depressed to encounter a fundamentally new concept that I
> was all along unheard of. 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.

Basically, there is no difference to function/subroutine call.  The
difference is just that there is no "call stack": the dynamic context
for a call is created on the heap and is garbage-collected when it is
no longer accessible.  A continuation is just a reference to the state
of the current dynamic context.  As long as a continuation remains
accessible, you can return to it as often as you like.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum


reply via email to

[Prev in Thread] Current Thread [Next in Thread]