John Siracusa [EMAIL PROTECTED] writes:
Did this ever get resolved to anyone's satisfaction? While reading
EX6, I found myself wonder exactly what for() would look like in
Perl 6 code...
A for loop[1] is basically syntax sugar for a while loop. In general,
where foo, bar, baz, and quux are
Luke Palmer [EMAIL PROTECTED] writes:
Yes, it's possible to have two routines with the same name which
differ by signature... however, in Perl 6, Cfor has only one
signature, and it's the one above. The Cfor loop you are thinking
of is spelled Cloop,
Oh, yes, forgot about that.
To the
Fwd from Luke -- he's adopted a retarded MUA.
--- Luke Palmer [EMAIL PROTECTED] wrote:
Date: Mon, 11 Aug 2003 21:22:05 -0600
From: Luke Palmer [EMAIL PROTECTED]
Subject: Re: Perl 6's for() signature
Austin Hastings writes:
And you can't do that because the loop has no way of knowing
Jonadab The Unsightly One wrote:
John Siracusa [EMAIL PROTECTED] writes:
Did this ever get resolved to anyone's satisfaction? While reading
EX6, I found myself wonder exactly what for() would look like in
Perl 6 code...
A for loop[1] is basically syntax sugar for a while loop. In
Jonadab The Unsightly One wrote:
John Siracusa [EMAIL PROTECTED] writes:
Did this ever get resolved to anyone's satisfaction? While reading
EX6, I found myself wonder exactly what for() would look like in
Perl 6 code...
A for loop[1] is basically syntax sugar for a while
-Original Message-
From: Luke Palmer [mailto:[EMAIL PROTECTED]
Austin Hastings writes:
From: Luke Palmer [mailto:[EMAIL PROTECTED]
Actually, in Perl 6, they'll do that anyway. Scope in loops is
strictly defined by the location of the braces WRT the location of
my. That
-Original Message-
From: Luke Palmer [mailto:[EMAIL PROTECTED]
Actually, in Perl 6, they'll do that anyway. Scope in loops is
strictly defined by the location of the braces WRT the location of
my. That is:
while (my $x = somefunc()) { ... }
# $x still in scope
And
Abhijit A. Mahabal [EMAIL PROTECTED] writes:
There is another problem beyond efficiency: the P6 list semantics is lazy.
The following is valid P6, AFAIK:
for 1 .. Inf {
print $_;
last when 10;
}
Yeah, but that's a foreach loop, despite the fact that foreach is
spelled
Abhijit A. Mahabal [EMAIL PROTECTED] writes:
There is another problem beyond efficiency: the P6 list semantics is lazy.
The following is valid P6, AFAIK:
for 1 .. Inf {
print $_;
last when 10;
}
Yeah, but that's a foreach loop, despite the fact that foreach is
spelled for in your
[EMAIL PROTECTED] (Rod Adams) wrote in message
Proposed behavior of *?@ : All Arguement to Parameter mapping left of it
are processed Left to Right. Once seen, the mapping starts over right to
left. Everything remaining is slurpable.
Yes, it's more expensive to use, just like the RE version,
[EMAIL PROTECTED] (Rod Adams) wrote in message
Proposed behavior of *?@ : All Arguement to Parameter mapping left of it
are processed Left to Right. Once seen, the mapping starts over right to
left. Everything remaining is slurpable.
Yes, it's more expensive to use, just like the RE
FWIW, we're aware of the problem.
I posed this very question to Larry a few months back, when I was writing E6.
We're still mulling over the correct answer. The last thought on the problem
that Larry's shared with me was that there may need to be a special case for
allowing a single block
[EMAIL PROTECTED] (Damian Conway) writes:
The last thought on the problem that Larry's shared with me was that there
may need to be a special case for allowing a single block parameter after
the slurpy
And the Rubyometer creeps up another few notches...
(Gosh, you'd almost think that Matz had
On Fri, Aug 01, 2003 at 11:01:15PM +0100, Simon Cozens wrote:
: [EMAIL PROTECTED] (Damian Conway) writes:
: The last thought on the problem that Larry's shared with me was that there
: may need to be a special case for allowing a single block parameter after
: the slurpy
:
: And the Rubyometer
From an old summary:
http://www.perl.com/pub/a/2003/04/p6pdigest/20030427.html?page=2
Paul Hodges took a crack at implementing for as a subroutine and came
up with
something that didn't look too insane. Luke Palmer added a refinement
allowing
for n at a time looping. However, for reasons
At 10:05 AM 7/31/2003 -0600, Luke Palmer wrote:
Well, I don't think it's possible, actually. There's a flattening
list context at the beginning (implying a sugary drink from 7 eleven),
followed by a code block. But, as we know, slurpy arrays can only
come at the end of positional
-Original Message-
From: Rod Adams [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 31, 2003 12:56 PM
To: Perl 6 Language
Subject: Re: Perl 6's for() signature
At 10:05 AM 7/31/2003 -0600, Luke Palmer wrote:
Well, I don't think it's possible, actually. There's a flattening
list context at the beginning
everything, then poping the block off of the array?
Rob
-Original Message-
From: Rod Adams [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 31, 2003 12:56 PM
To: Perl 6 Language
Subject: Re: Perl 6's for() signature
At 10:05 AM 7/31/2003 -0600, Luke Palmer wrote:
Well, I don't think it's possible
Anyone but me feel the need for non-greedy slurpy arrays? similar to
non-greedy RE matches?
Then we could do:
sub for ([EMAIL PROTECTED], block) {...}
Proposed behavior of *?@ : All Arguement to Parameter mapping left of it
are processed Left to Right. Once seen, the mapping starts over
- Original Message -
From: Hanson, Rob [EMAIL PROTECTED]
To: 'Rod Adams' [EMAIL PROTECTED]; Perl 6 Language
[EMAIL PROTECTED]
Sent: Thursday, July 31, 2003 1:29 PM
Subject: RE: Perl 6's for() signature
Anyone but me feel the need for non-greedy
slurpy arrays? similar to non-greedy
20 matches
Mail list logo