Re: RFC 27 (v1) Coroutines for Perl

2000-08-05 Thread Nick Ing-Simmons
Dan Sugalski <[EMAIL PROTECTED]> writes: >At 01:17 PM 8/4/00 +0500, Tom Scola wrote: >> >[I think this belongs on the language list, FWIW, Cc'd there] >> > >> >I like this, but I'd like to see this, inter-thread queues, and events >>all >> >use the same communication method. Overload filehandles t

Re: RFC 27 (v1) Coroutines for Perl

2000-08-04 Thread Sam Tregar
On 4 Aug 2000, Perl6 RFC Librarian wrote: > This proposal introduces a new keyword to perl, "co", as a complement > to "sub". A subroutine is defined thusly: > > co foo { ... } > > Coroutines can also be closures: > > my $x = co { ... } Does this really require a new keyword? Why not do

Re: RFC 27 (v1) Coroutines for Perl

2000-08-04 Thread Dan Sugalski
At 11:24 AM 8/4/00 -0800, Michael Fowler wrote: >On Fri, Aug 04, 2000 at 03:13:24PM -, Perl6 RFC Librarian wrote: > > co foo { ... } > > > my $x = co { ... } > > > >$y = <|foo>; > > > >print |$x "hello, world\n"; > > > > Inside a coroutine, the meanings of "<>" and the default file

Re: RFC 27 (v1) Coroutines for Perl

2000-08-04 Thread Michael Fowler
On Fri, Aug 04, 2000 at 03:13:24PM -, Perl6 RFC Librarian wrote: > co foo { ... } > my $x = co { ... } > >$y = <|foo>; > >print |$x "hello, world\n"; > > Inside a coroutine, the meanings of "<>" and the default file > descriptor for print, printf, etc. are overloaded. Is it ju

Re: RFC 27 (v1) Coroutines for Perl

2000-08-04 Thread Uri Guttman
> "DS" == Dan Sugalski <[EMAIL PROTECTED]> writes: DS> Not gonna happen. Tk and signals, at the very least, will see to that. DS> Coroutines are also an awfully limited threading mechanism, and I think DS> they'd have the same problems that threads have (or the use of multiple DS>

Re: RFC 27 (v1) Coroutines for Perl

2000-08-04 Thread Dan Sugalski
At 01:17 PM 8/4/00 +0500, Tom Scola wrote: > >[I think this belongs on the language list, FWIW, Cc'd there] > > > >I like this, but I'd like to see this, inter-thread queues, and events >all > >use the same communication method. Overload filehandles to pass events > > >around instead, so: > >I'm p

Re: RFC 27 (v1) Coroutines for Perl

2000-08-04 Thread Tom Scola
>I don't see the need for a new keyword. An attribute should be fine > > sub foo : coroutine { } > >Would do quite well. It would fit with the :method attribute, and >a possible :lvalue attribute. That would be fine. >Anyway, isn't what you are proposing more of a generator/sink rather >th

Re: RFC 27 (v1) Coroutines for Perl

2000-08-04 Thread Tom Scola
>[I think this belongs on the language list, FWIW, Cc'd there] > >I like this, but I'd like to see this, inter-thread queues, and events all >use the same communication method. Overload filehandles to pass events >around instead, so: I'm proposing that events and threads be dropped in lieu of c

Re: RFC 27 (v1) Coroutines for Perl

2000-08-04 Thread Chaim Frenkel
I don't see the need for a new keyword. An attribute should be fine sub foo : coroutine { } Would do quite well. It would fit with the :method attribute, and a possible :lvalue attribute. Anyway, isn't what you are proposing more of a generator/sink rather than a coroutine? I understood

Re: RFC 27 (v1) Coroutines for Perl

2000-08-04 Thread Dan Sugalski
At 09:04 AM 8/4/00 -0700, Nathan Wiger wrote: > > I like this, but I'd like to see this, inter-thread queues, and events all > > use the same communication method. Overload filehandles to pass events > > around instead, so: > > > >my $thing = <$handle>; > > > > could read a record from a file,

Re: RFC 27 (v1) Coroutines for Perl

2000-08-04 Thread Nathan Wiger
> I like this, but I'd like to see this, inter-thread queues, and events all > use the same communication method. Overload filehandles to pass events > around instead, so: > >my $thing = <$handle>; > > could read a record from a file, or get an event from the event queue, or > receive some d

Re: RFC 27 (v1) Coroutines for Perl

2000-08-04 Thread Dan Sugalski
At 03:13 PM 8/4/00 +, Perl6 RFC Librarian wrote: >Coroutines for Perl [I think this belongs on the language list, FWIW, Cc'd there] I like this, but I'd like to see this, inter-thread queues, and events all use the same communication method. Overload filehandles to pass events around inste

RFC 27 (v1) Coroutines for Perl

2000-08-04 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://tmtowtdi.perl.org/rfc/ =head1 TITLE Coroutines for Perl =head1 VERSION Maintainer: Tom Scola <[EMAIL PROTECTED]> Date: 04 Aug 2000 Version: 1 Mailing List: [EMAIL PROTECTED] Number: 27 =head1 ABSTRACT Two motavations for the