in reply to Re: Re: Perl 6 coroutines (RFC 31)
in thread Perl 6 coroutines (RFC 31)

The semantics of real continuations are less trivial than that, and they appear (to me, at least) substantially more convoluted when applied to procedural, as opposed to functional languages. What you're describing is still a form of generators, which can be built with continuations and anonymous subs, but doesn't provide the full power of continuations.

Additionaly, rebinding @_ is most likely a bad idea. There are better ways to pass values through to continuations. Changing your local context somewhat defeats the purpose of continuations to begin with.

   MeowChow                                   
               s aamecha.s a..a\u$&owag.print

Replies are listed 'Best First'.
Re: Re: Re: Re: Perl 6 coroutines (RFC 31)
by John M. Dlugosz (Monsignor) on Jul 14, 2001 at 22:59 UTC
    So how would you do it, in Perl?
      I haven't had much practical experience with continuations, so although I grok the general theory underlying them, I really haven't a clue what a good implementation for Perl would look like :/ Having read a bit more on this topic, it appears as if continuations are a theoretically good, but inefficient way to build the higher-level language constructs.
         MeowChow                                   
                     s aamecha.s a..a\u$&owag.print
        re your link: I thought LISP was standardized =years= ago, as CommonLisp.