pugs-comm...@feather.perl6.nl wrote:
Author: moritz
Date: 2009-09-13 19:42:10 +0200 (Sun, 13 Sep 2009)
New Revision: 28233

[S03] ^4 cannot mean 0..3 and 0..^4 at the same time, because they are not the 
The unary C<^> operator generates a range from C<0> up to
-one less than its argument.  So C<^4> is short for C<0..^4> or C<0..3>.
+its argument, exclusively.  So C<^4> is short for C<0..^4>.
for ^4 { say $_ } # 0, 1, 2, 3

I think that it would be better to pick the other meaning of C<^4> instead, meaning C<0..3>, because that keeps the meaning of "^" consistent as "up to but not including". Then also saying ^4 means you get a range of 4 elements, so there is that consistency too.

Also, the code example still reflects the 0..3 meaning that I prefer, so it is an error if the meaning you picked is chosen.

-- Darren Duncan

Reply via email to