From: Allison Randal <[EMAIL PROTECTED]>
   Date: Fri, 21 Jul 2006 00:24:13 -0700

   chromatic wrote:

   > Here's what I don't understand.  Why is there talk of a stack to keep 
track of 
   > various flow control constructs?  Doesn't a CPS system use a linked list 
of 
   > continuations to handle normal flow control?  If that works there, why not 
   > another linked list of continuations to handle exceptional flow control?

Both are implemented as linked lists, now and for the (to me)
conceivable future.  For most purposes, though, they behave like stacks.
Furthermore, the codebase uses identifiers like "control_stack",
"Stack_Entry", etc, so I have fallen into the habit of calling them
"stacks".  I think it would be good to change at least some of these
names, but changing my habits of speech may take longer.  :-/

   (And my apologies to chromatic for not replying sooner; the original
post got buried, and I lost track of the fact that I hadn't replied.)

   I would ultimately like to see exceptions head down that road. But an 
   exceptions stack is a good first approximation, and is at least safer 
   than the current combined control+exceptions stack.

   (CPS is, BTW, a part of Parrot internals in need of more documentation.)

   Allison

Two weeks ago I started writing something I had been thinking about for
a year now, tentatively called "Continuations, Coroutines, And All That:
An informal introduction to creating advanced control structures in
Parrot."  It is still mostly an outline, though -- it's hard to write a
tutorial about features for which the spec is in flux.  ;-}

                                        -- Bob

Reply via email to