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

2002-01-19 Thread Michael G Schwern
On Fri, Jan 18, 2002 at 08:03:41PM -0800, Larry Wall wrote: > : allow this: > : > : File.foreach('/usr/dict/words') { print } > > File.foreach('/usr/dict/words', { print }) > > or even (presuming the prototype is available for parsing): > > File.foreach '/usr/dict/words' { print }

Apoc4 - A little wish

2002-01-19 Thread Angel Faus
Hi all, I have just one syntatic wish for Apoc4 (which in all other points I find utterly fantastic). Could we have: foreach $item in @arr {...} Instead of foreach @arr -> $item {...} I find the first one: - Much more pleasent to the eyes and less noisy on a long program. - Easie

Re: Apoc4 - A little wish

2002-01-19 Thread Angel Faus
Sorry for the 4 times posts, i was testing a new mail program and it didn't prove too good. Now i feel so ashamed :-[ -angel

Re: Apoc4 - A little wish

2002-01-19 Thread Randal L. Schwartz
> "Angel" == Angel Faus <[EMAIL PROTECTED]> writes: Angel> Hi all, Angel> I have just one syntatic wish for Apoc4 (which in all other points I Angel> find utterly fantastic). Angel> Could we have: Angel> foreach $item in @arr {...} Angel> Instead of Angel> foreach @arr -> $item {...} L

Apoc4: "When do I put a semicolon after a curly?"

2002-01-19 Thread Bryan C. Warnock
The two current examples of an evil expression block are do {} and eval {}, which require a semicolon terminator. However, with eval {} leaving, that leaves just do {}, which does (or should) fall more in line of thinking of grep {}, map {}, and sort {}: the other expression blocks. For do {}

Apoc4: Parentheses

2002-01-19 Thread Bryan C. Warnock
Interestingly, this one tweak to the whitespace rule also means that we'll be able to simplify the parentheses out of other similar built-in constructs: if $foo { ... } elsif $bar { ... } else { ... } while $more { ... } for 1..10 { ... } I think throwing out two required

Apoc4: The loop keyword

2002-01-19 Thread Bryan C. Warnock
No examples are given, but are we to assume that this: for ($x = 0; $x < 100; $x++) { ... } becomes this: loop $x=0; $x < 100; $x++ { ... } How would you use an $x lexically scoped to the loop block? Most of the other constructs seem to be using a '-> $x' constr

Apoc4: 'when' blocks versus statements

2002-01-19 Thread Bryan C. Warnock
Why the double semantics of 'when'? It implicitly breaks when used as a 'when' block, but does not as a 'when' statement. It seems that a when should be a when should be a when, and a when being a when would be a win. The example given: given $x { warn("Odd value")when

Re: Apoc 4?

2002-01-19 Thread Bart Lateur
On Fri, 18 Jan 2002 12:33:48 -0500, Will Coleda wrote: >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 late

Re: Apoc4: "When do I put a semicolon after a curly?"

2002-01-19 Thread Piers Cawley
You're treating do, if, foreach as if they were keywords. I'm not entirely sure that that's still the case. And you're also forgetting the possibility of user implemented control type operators/methods. Unless I'm very much mistaken you're suggesting that we special case the parser for 'do' and a

Re: Apoc4: "When do I put a semicolon after a curly?"

2002-01-19 Thread Bryan C. Warnock
On Saturday 19 January 2002 12:24, Piers Cawley wrote: > You're treating do, if, foreach as if they were keywords. I'm not > entirely sure that that's still the case. 'do' perhaps. But not really. And it's irrelevant to my argument. > And you're also forgetting > the possibility of user imple

Re: Apoc 4?

2002-01-19 Thread iain truskett
* Bart Lateur ([EMAIL PROTECTED]) [20 Jan 2002 03:56]: > On Fri, 18 Jan 2002 12:33:48 -0500, Will Coleda wrote: > > http://www.perl.com/pub/a/2002/01/15/apo4.html [...] > I thought I had just missed it... but there's no trace of it in the > archives of <[EMAIL PROTECTED]>. Or any other perl6 list.

Re: Apoc 4?

2002-01-19 Thread Bryan C. Warnock
On Saturday 19 January 2002 12:20, iain truskett wrote: > * Bart Lateur ([EMAIL PROTECTED]) [20 Jan 2002 03:56]: > > On Fri, 18 Jan 2002 12:33:48 -0500, Will Coleda wrote: > > > http://www.perl.com/pub/a/2002/01/15/apo4.html > > [...] > > > I thought I had just missed it... but there's no trace of

Re: Apoc 4?

2002-01-19 Thread Dan Sugalski
At 1:14 PM -0500 1/19/02, Bryan C. Warnock wrote: >On Saturday 19 January 2002 12:20, iain truskett wrote: >> * Bart Lateur ([EMAIL PROTECTED]) [20 Jan 2002 03:56]: >> > On Fri, 18 Jan 2002 12:33:48 -0500, Will Coleda wrote: >> > > http://www.perl.com/pub/a/2002/01/15/apo4.html >> >> [...] >>

Perl 6, now with 50% more NATO!

2002-01-19 Thread Michael G Schwern
This just popped up from my sig file: Plus I remember being impressed with Ada because you could write an infinite loop without a faked up condition. The idea being that in Ada the typical infinite loop would be normally be terminated by detonation. -- Larry Wall in <[EMA

[A-Z]+\s*\{

2002-01-19 Thread Brent Dax
Is this list of special blocks complete and correct? BEGIN Executes at the beginning of compilation CHECK Executes at the end of compilation INITExecutes at the beginning of run END Executes at the end of run

Re: [A-Z]+\s*\{

2002-01-19 Thread Bryan C. Warnock
On Saturday 19 January 2002 22:05, Brent Dax wrote: > Is this list of special blocks complete and correct? > > BEGIN Executes at the beginning of compilation > CHECK Executes at the end of compilation > INITExecutes at the beginning of run >

Re: [A-Z]+\s*\{

2002-01-19 Thread Me
> On Saturday 19 January 2002 22:05, Brent Dax wrote: > > Is this list of special blocks complete and correct? > > > > BEGIN Executes at the beginning of compilation > > CHECK Executes at the end of compilation > > INIT Executes at the beginning of run > > END Executes at the end of run > > PRE Ex