On Fri, Jul 24, 2009 at 5:19 PM, Andrei Alexandrescu<[email protected]> wrote:
>> obj.prop op= value; >> >> Simply becomes: >> >> obj.prop.set(obj.prop.get op value); > > I think this would be inefficient in many cases. Um, what do you have to write now? "obj.prop = obj.prop op value". All I'm suggesting is that the compiler automatically transform the expression for you. Also, what someone else suggested - that it become "auto temp = obj.prop get; temp op= value; obj.prop.set(temp)" - is technically more correct, in terms of operator overloading (i.e. if the property returns a BigInt, or something).
