On Mon, Apr 29, 2002 at 10:26:26AM -0400, Aaron Sherman wrote:
> I would expect that to be "elsuntil", but as we're dropping "until" from
> the language, it's a moot point.
Er, what?!? Who said we're dropping "until"? Did I miss something?
> Proposed Perl6:
>
> loop $i=0;$i<$max;$i++ {
> ...
> } elsfor @x -> $_ {
> ...
> }
Hrm. Do you also propose an "elsloop" too? I think a general "else"
or "otherwise" on all loops allows what you want:
loop $i = 0; $i < $max; $i++ {
...
} else {
for @x { ... }
}
And is just as clear. Or if the new "for", "if", "while", etc.
constructs can be somehow generate a code reference, maybe we can write
it this way:
loop $i = 0; $i < $max; $i++ {
...
} else for @x { ... }
loop $i = 0; $i < $max; $i++ {
...
} else while ($x < 5) { ... }
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]