On Thu, 26 Feb 2009, Martin D Kealey wrote:

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];

Good idea. That retains the functionality, but without us having to spec it :).

| Name: Tim Nelson                 | Because the Creator is,        |
| E-mail: wayl...@wayland.id.au    | I am                           |

Version 3.12
GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI++++ D G+ e++>++++ h! y-

Reply via email to