December 19, 2003
Walter,

I believe two more operator overloads are required to complement existing ones. They are:

int opSlice(int x, int y, int[] value); // overloads a[i .. j] = b[]
int opSlice(int[] value);  // overloads a[] = b[]

I am prepared to admit that while the first is a necessity, the second is just for completeness' sake, however I think that's a good enough reason to have it.

The precedents for their inclusion are:

     int opIndex(int i, int value);
     int opSlice();  // overloads a[]
     int opSlice(int x, int y); // overloads a[i .. j]

and the slice semantics for arrays.

Thank you,

Rupert




December 23, 2003
"Rupert Millard" <rupertamillard@hotmail.DELETE.THIS.com> wrote in message news:brvgha$21n8$1@digitaldaemon.com...
> Walter,
>
> I believe two more operator overloads are required to complement existing ones. They are:
>
> int opSlice(int x, int y, int[] value); // overloads a[i .. j] = b[]
> int opSlice(int[] value);  // overloads a[] = b[]
>
> I am prepared to admit that while the first is a necessity, the second is just for completeness' sake, however I think that's a good enough reason
to
> have it.
>
> The precedents for their inclusion are:
>
>      int opIndex(int i, int value);
>      int opSlice();  // overloads a[]
>      int opSlice(int x, int y); // overloads a[i .. j]
>
> and the slice semantics for arrays.

I'll check it out. -Walter


Top | Discussion index | About this forum | D home