Does this mean we get Ruby/CLU-style iterators?

2002-01-18 Thread Michael G Schwern
Reading this in Apoc 4 sub mywhile ($keyword, &condition, &block) { my $l = $keyword.label; while (&condition()) { &block(); CATCH { my $t = $!.tag; when X::Control::next { die if $t && $t ne $l); next } w

Re: Does this mean we get Ruby/CLU-style iterators?

2002-01-18 Thread Piers Cawley
Michael G Schwern <[EMAIL PROTECTED]> writes: > Reading this in Apoc 4 > > sub mywhile ($keyword, &condition, &block) { > my $l = $keyword.label; > while (&condition()) { > &block(); > CATCH { > my $t = $!.tag; > when X::

Apoc 4?

2002-01-18 Thread David Whipp
Michael G Schwern wrote: > Reading this in Apoc 4 ... I looked on http://dev.perl.org/perl6/apocalypse/: no sign of Apoc4. Where do I find this latest installment? Dave.

Re: Apoc 4?

2002-01-18 Thread Will Coleda
http://www.perl.com/pub/a/2002/01/15/apo4.html David Whipp wrote: > > Michael G Schwern wrote: > > > Reading this in Apoc 4 ... > > I looked on http://dev.perl.org/perl6/apocalypse/: no sign of Apoc4. Where > do I find this latest installment? > > Dave.

Re: Apoc 4?

2002-01-18 Thread Dan Sugalski
>Michael G Schwern wrote: > >> Reading this in Apoc 4 ... > >I looked on http://dev.perl.org/perl6/apocalypse/: no sign of Apoc4. Where >do I find this latest installment? www.perl.com. dev.perl.org must just not have a link yet. -- Dan ---

Ex4, Apo5, when ?

2002-01-18 Thread raptor
Did u passed "Bermuda Triangle" :") raptor

Re: Ex4, Apo5, when ?

2002-01-18 Thread Dan Sugalski
At 10:16 AM +0200 1/18/02, raptor wrote: >Did u passed "Bermuda Triangle" :") It may be a bit before Ex4 is done. Damian's on a cruise ship at the moment, so even if he's got the time (and I don't think he does) he's likely lacking connectivity. I expect he'll give us word at some point what t

Re: Ex4, Apo5, when ?

2002-01-18 Thread Michael G Schwern
On Fri, Jan 18, 2002 at 03:35:59PM -0500, Dan Sugalski wrote: > At 10:16 AM +0200 1/18/02, raptor wrote: > >Did u passed "Bermuda Triangle" :") > > It may be a bit before Ex4 is done. Damian's on a cruise ship at the > moment, so even if he's got the time (and I don't think he does) he's > like

Re: Ex4, Apo5, when ?

2002-01-18 Thread Dan Sugalski
At 4:17 PM -0500 1/18/02, Michael G Schwern wrote: >On Fri, Jan 18, 2002 at 03:35:59PM -0500, Dan Sugalski wrote: >> At 10:16 AM +0200 1/18/02, raptor wrote: >> >Did u passed "Bermuda Triangle" :") >> >> It may be a bit before Ex4 is done. Damian's on a cruise ship at the >> moment, so even if

Apo4: PRE, POST

2002-01-18 Thread David Whipp
Apo4, when introducing POST, mentions that there is a corresponding "PRE" block "for design-by-contract programmers". However, I see the POST block being used as a finalize; and thus allowing (encouraging?) it to have side effects. I can't help feeling that contract/assertion checking should not

RE: Apo4: PRE, POST

2002-01-18 Thread Garrett Goebel
From: David Whipp [mailto:[EMAIL PROTECTED]] > > Apo4, when introducing POST, mentions that there is a > corresponding "PRE" block "for design-by-contract > programmers". > > However, I see the POST block being used as a finalize; > and thus allowing (encouraging?) it to have side effects. It m

Re: Does this mean we get Ruby/CLU-style iterators?

2002-01-18 Thread Dan Sugalski
At 3:37 PM + 1/18/02, Piers Cawley wrote: >Michael G Schwern <[EMAIL PROTECTED]> writes: > >Hmm... making up some syntax on the fly. I sort of like the idea of >being able to do > > class File; > sub foreach ($file, &block) is Control { > # 'is Control' declares this as a contr

Re: Apo4: PRE, POST

2002-01-18 Thread Me
> [concerns over conflation of post-processing and post-assertions] Having read A4 thoroughly, twice, this was my only real concern (which contrasted with an overall sense of "wow, this is so cool"). --me

Re: Does this mean we get Ruby/CLU-style iterators?

2002-01-18 Thread Piers Cawley
Dan Sugalski <[EMAIL PROTECTED]> writes: > At 3:37 PM + 1/18/02, Piers Cawley wrote: >>Michael G Schwern <[EMAIL PROTECTED]> writes: >> >>Hmm... making up some syntax on the fly. I sort of like the idea of >>being able to do >> >> class File; >> sub foreach ($file, &block) is Control {

Re: Apo4: PRE, POST

2002-01-18 Thread Piers Cawley
"Me" <[EMAIL PROTECTED]> writes: >> [concerns over conflation of post-processing and post-assertions] > > Having read A4 thoroughly, twice, this was my only real concern > (which contrasted with an overall sense of "wow, this is so cool"). I think that people have sort of got used to the fact th

A question

2002-01-18 Thread Piers Cawley
Okay boys and girls, what does this print: my @aaa = qw/1 2 3/; my @bbb = @aaa; try { print "$_\n"; } for @aaa; @bbb -> my $a; my $b { print "$a:$b"; } I'm guessing one of: 1:1 2:2 3:3 or a syntax error, complaining about something near C<@bbb -> my $a ; my $b {> In other words, how

Re: A question

2002-01-18 Thread Glenn Linderman
That particular example is flawed, because the try expression is turned into a try statement because the } stands alone on its line. But if you eliminate a couple newlines between } and for, then your question makes sense (but the code is not well structured, but hey, maybe you take out all the n

Re: Apo4: PRE, POST

2002-01-18 Thread Glenn Linderman
Me wrote: > > [concerns over conflation of post-processing and post-assertions] > > Having read A4 thoroughly, twice, this was my only real concern > (which contrasted with an overall sense of "wow, this is so cool"). > > --me Yes, very, very cool. I especially liked how RFC 88 was "accepted wi

Re: Does this mean we get Ruby/CLU-style iterators?

2002-01-18 Thread Larry Wall
Michael G Schwern writes: : Reading this in Apoc 4 : : sub mywhile ($keyword, &condition, &block) { : my $l = $keyword.label; : while (&condition()) { : &block(); : CATCH { : my $t = $!.tag; : when X::Control::next { die

Re: Does this mean we get Ruby/CLU-style iterators?

2002-01-18 Thread Larry Wall
Piers Cawley writes: : Hmm... making up some syntax on the fly. I sort of like the idea of : being able to do : : class File; : sub foreach ($file, &block) is Control { : # 'is Control' declares this as a control sub, which, amongst : # other things 'hides' itself from cal

Re: Does this mean we get Ruby/CLU-style iterators?

2002-01-18 Thread Piers Cawley
Larry Wall <[EMAIL PROTECTED]> writes: > Michael G Schwern writes: > : Reading this in Apoc 4 > : > : sub mywhile ($keyword, &condition, &block) { > : my $l = $keyword.label; > : while (&condition()) { > : &block(); > : CATCH { > : my $

Re: A question

2002-01-18 Thread Piers Cawley
[reformatting response for readability and giving Glenn a stiff talking to] Glenn Linderman <[EMAIL PROTECTED]> writes: > Piers Cawley wrote: > >> Okay boys and girls, what does this print: >> >> my @aaa = qw/1 2 3/; >> my @bbb = @aaa; >> >> try { >> print "$_\n"; >> } >> >> for @aaa; @bbb ->