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

Re: Abstracting continuations

(I see this one's been missed in all the fun...)

At 2:20 PM -0400 8/13/03, Michael St . Hippolyte wrote:
>I am trying to improve my understanding of continuations
>from the point of view of programming language design
>rather than implementation, i.e. what sort of syntax is
>necessary to give programmers the power to express
>continuations, regardless of how it's implemented.

In their simplest form, continuations don't require any syntactic 
support. A simple:

    foo = takecontinuation();

to make foo a continuation object, and:


to use the continuation are sufficient. You could, if you chose, 
present them completely functionally. Heck, in this way you could add 
continuations to C, as long as you completely reworked how the code 
generation is done. (Since there's nothing in the C standard, so far 
as I know, that mandates behaviour that actually makes continuations 
untenable, though common expectations of C's behaviour would take 
many people by surprise if you tried it)

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
dan@sidhe.org                         have teddy bears and even
                                       teddy bears get drunk