Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: coroutines

11 views
Skip to first unread message

Matt Fowles

unread,
Jun 30, 2005, 3:55:58 PM6/30/05
to Leopold Toetsch, Internals List
Leo~

On 6/30/05, Leopold Toetsch <l...@toetsch.at> 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.

Matt
--
"Computer Science is merely the post-Turing Decline of Formal Systems Theory."
-???

Leopold Toetsch

unread,
Jun 30, 2005, 3:47:10 PM6/30/05
to Internals List
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,

leo

Leopold Toetsch

unread,
Jun 30, 2005, 4:40:07 PM6/30/05
to Matt Fowles, Internals List

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

>
> Leo~
>
> On 6/30/05, Leopold Toetsch <l...@toetsch.at> 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

0 new messages