February 10, 2007 Re: opIndexAddAssign? ... | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jarrett Billingsley | Jarrett Billingsley wrote > I'll have to create a proxy class to hold > the data which modulos its value by 10 whenever opAssign is used, > and make an array of that, and create all those class instances. This or the other: repeating the same operation for every other opIndex<op>Assign, which D currently not has. > I'm talking about adding > or setting an index of a container type, not getting one. Correct. But storing data without any accesses is quite useless. As Andrei already pointed out | Probably the principled thing to do is to allow two functions, one | that returns lvalue and one that returns an rvalue, and have the | compiler pick the appropriate one. there might be a difference between the representations of data inside and outside of classes. -manfred |
Copyright © 1999-2021 by the D Language Foundation