digitalmars.D - Request - opSliceAssign()
- Arcane Jill (8/8) Jun 03 2004 I humbly request that opIndex(int i, int value) be renamed as opIndexAss...
- Matthew (4/12) Jun 04 2004 Gets my vote
- Norbert Nemec (10/21) Jun 07 2004 I agree. Especially, since opIndex(int i, int value) cannot be extended ...
I humbly request that opIndex(int i, int value) be renamed as opIndexAssign(int i, int value), for consistency with the other assigning operator overloads. It says "The names of the overloaded operators may change" in the manual, so you've already covered yourself there. I also request that you add the new operator opSliceAssign(int i, int j, T value), to overload x[i..j] = value; Jill
Jun 03 2004
Gets my vote "Arcane Jill" <Arcane_member pathlink.com> wrote in message news:c9mkoo$1pks$1 digitaldaemon.com...I humbly request that opIndex(int i, int value) be renamed as opIndexAssign(int i, int value), for consistency with the other assigning operator overloads. It says "The names of the overloaded operators may change" in the manual, soyou'vealready covered yourself there. I also request that you add the new operator opSliceAssign(int i, int j, T value), to overload x[i..j] = value; Jill
Jun 04 2004
Arcane Jill wrote:I humbly request that opIndex(int i, int value) be renamed as opIndexAssign(int i, int value), for consistency with the other assigning operator overloads. It says "The names of the overloaded operators may change" in the manual, so you've already covered yourself there. I also request that you add the new operator opSliceAssign(int i, int j, T value), to overload x[i..j] = value; JillI agree. Especially, since opIndex(int i, int value) cannot be extended to multiple dimensions in the future. Anyhow: I would really like to see an idea, how would generalize opSlice for more dimensions and striding capabilities. Making x[i1..j1:s1,i2..j2:s2] execute something like opSlice(int i1,int j1,int s1,int i2,int j2,int s2) seems a bit messy to me. Any ideas?
Jun 07 2004