Re: Dimension of slices; scalars versus 1-element arrays?

2005-01-13 Thread Craig DeForest
Hmmm... David, you seem to have covered all the issues with that rather lucid screed [attached at bottom]. I have a couple of dragon-nits to pick, one involving infrastructure and one involving syntax. First: it seems strange to me to add yet another property ("but used_to_be_scalar") to t

Making control variables local in a loop statement

2005-01-13 Thread Joe Gottman
In Perl5, given code like for (my $n = 0; $n < 10; ++$n) {.} the control variable $n will be local to the for loop. In the equivalent Perl6 code loop my $n = 0; $n < 10; ++$n {.} $n will not be local to the loop but will instead persist until the end of enclosing block. It woul

Re: Making control variables local in a loop statement

2005-01-13 Thread Juerd
Joe Gottman skribis 2005-01-13 19:35 (-0500): >In Perl5, given code like > for (my $n = 0; $n < 10; ++$n) {.} > the control variable $n will be local to the for loop. In the equivalent > Perl6 code >loop my $n = 0; $n < 10; ++$n {.} > $n will not be local to the loop but will instead

Re: Making control variables local in a loop statement

2005-01-13 Thread Luke Palmer
Joe Gottman writes: >It would be nice if there were some easy way to mimic the Perl5 behavior > in Perl6. In Perl6, the canonical way to make a variable local to a block > is by making it a parameter. I therefore suggest allowing the following > syntax: > > loop 0 -> $n; $n < 10; ++$n {..