On Wed, 25 Feb 2009, Timothy S. Nelson wrote:
> I'm in favour of retaining the $[ functionality, but lets give it some
> name like $*INDEX_BEGINNING or something like that, so that it's quite
> long for people to type :).

Surely the interpretation of the index should be up to each array-type?

  role OffsetArray[::ElementType = Object;; int $MinIndex = 1]
  {
    is Array;
    has ElementType @.contents;
    method circumflex:? [ ] ? (int $index where { $_ >= $MinIndex } ) {
      return @.contents[$index - $MinIndex];
    }
  }

-Martin

Reply via email to