On Tue, Feb 25, 2003 at 08:47:55AM +0100, Leopold Toetsch wrote:
> >Um... no. tail call optimization implies being able to replace *any*
> >tail call, not just a recursive one with a simple goto. Consider the
> >following calling sequence:
> 
> 
> >   b(arg) -> Push Continuation A onto the continuation chain
> 
> 
> Continuations are different anyway. They store the context of the parent 
> at the point they were created, and on invoke they swap context.

You don't mean the same thing by continuation.  For Piers, a
continuation is just a place where one can jump.  So, for a function
call, you push the return continuation (the place where you must jump
on return) onto the stack and jump to the continuation corresponding
to the function body.  What you mean by a continuation is what one may
call "first-class continuation", that is a continuation which can be
manipulated like any other "object" (you can pass it as argument of a
function, return it from a function, put it in a variable, ...)

-- Jerome

Reply via email to