Mark J. Reed wrote:
> I didn't see anything in the issue tracker, nor did any tests fail,

There are failing (but TODOed) tests somewhere below
t/spec/S02-builtin_data_types/

> but am I correct in assuming that array slicing is simply not
> implemented yet in Rakudo?

Correct.

> $ ./perl6 -e 'my @a = (1,2,3); say @a[0 .. 1];'
> 3
> 
> it takes the range in item context, which is the size of the range,
> and uses that as an index.  The PIR is pretty straightforward:
> 
> $I22 = "infix:.."($P20, $P21)
> ...
> set $P24, $P23[$I22]
> 
> Is that supposed to work?  Is the PIR subscript operation supposed to
> be smart enough to do the right thing with a subscript that happens to
> be a Range?  Or does that onus fall on the Perl6 compiler to generate
> PIR that handles it more manually?

I don't know that, but I know that Perl 6 needs some extra smartness for
the subscript operation anyway, because it supports funky stuff with the
Whatever star (@array[*-2] etc).

Moritz

-- 
Moritz Lenz
http://perlgeek.de/ |  http://perl-6.de/ | http://sudokugarden.de/

Reply via email to