Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: Re: Re: Perl 6 coroutines (RFC 31)

by MeowChow (Vicar)
on Jul 14, 2001 at 08:16 UTC ( #96673=note: print w/replies, xml ) Need Help??

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.

               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.
                     s aamecha.s a..a\u$&owag.print
        re your link: I thought LISP was standardized =years= ago, as CommonLisp.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://96673]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2020-10-29 22:29 GMT
Find Nodes?
    Voting Booth?
    My favourite web site is:

    Results (274 votes). Check out past polls.