On Jun 30, 2005, at 21:55, Matt Fowles wrote:


Leo~

On 6/30/05, Leopold Toetsch <[EMAIL PROTECTED]> wrote:
Nice summary with examples:

ftp://ftp.inf.puc-rio.br/pub/docs/techreports/04_15_moura.pdf

and we still have to define semantics of parrot couroutines, e.g. WRT
argument passing. See also Dan's blogs about couroutines,

I prefer the option of repassing arguments to coroutines.  It is
slightly easier to emulate not repassing with repassing then vice
versa.  That and it just feels more powerful to me.

Sounds reasonable.

Given the 3 operations of the paper:

  create    ... newsub Px, .Coroutine, *Pfunc*
  resume    ... invoke Px
  yield         invoke Px # inside the coro

and

  return        returncc  # terminate coro - invalidate

and the combinations of argument passing i.e. inserting appropriate set_args/_returns and get_params/get_results, we can express all these semantics.

I think we need a howto and tests ;-)

Matt

leo

Reply via email to