On Sat, Dec 11, 2021 at 11:28 AM Ralph Mellor
wrote:
> On Fri, Dec 10, 2021 at 9:49 PM Sean McAfee wrote:
> >
> > @array[-1]:exists is a syntax error, even though it looks like
> > it should just evaluate to True.
>
> In Raku `foo[-N]` is invalid. At compile-time if N is statically
> known,
TL;DR Raku does not treat a negative index as valid. To specify the index
of the last element, write `*-1`. What you're seeing is Raku trying to inform
you that you are using invalid indices.
On Fri, Dec 10, 2021 at 9:49 PM Sean McAfee wrote:
>
> @array[-1]:exists is a syntax error, even though
On Fri, Dec 10, 2021 at 1:48 PM I wrote:
> So this looks pretty buggy, but I wonder if I'm somehow invoking undefined
> behavior by combining semicolons and adverbs while subscripting. The
> online docs cover both features separately, but not in tandem that I can
> see.
>
Actual
by all
my previous evaluations of @a[$i;$i]:exists. If I continue to evaluate the
expression repeatedly, I get a run of Falses, then another batch of errors
at some later point.
So this looks pretty buggy, but I wonder if I'm somehow invoking undefined
behavior by combining semicolons and adve