D - More opSlice Overloads
- Rupert Millard (15/15) Dec 19 2003 Walter,
- Walter (4/17) Dec 22 2003 to
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
Dec 19 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 reasontohave 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
Dec 22 2003