Is DMD 0.166 RC 1.0?
Ary Manzana
asterite at gmail.com
Tue Sep 5 13:15:58 PDT 2006
Walter Bright wrote:
> Derek Parnell wrote:
>> What 'odd case'?
>>
>> What 'programmer oversight'?
>>
>> The coder writes
>> a.prop++;
>>
>> because the 'prop' is a data item in the object that she wants to
>> increment. It is irrelevant to the coder whether or not the class author
>> decided to implement this data item as a property or data member. From
>> the
>> perspective of the user of the class, 'prop' represents some data in the
>> object. The implementation details are not a concern for the user of the
>> class.
>
> Oh, I see what you mean now. I had misunderstood. Sorry.
What's the problem here? Is it hard to implement in the compiler or is
unexpected behavior the problem? I think nowhere is unexpected behavior
in "a.prop++". Just translate it to "a.prop = a.prop + 1".
If "a.prop" is a time consuming one, it should be great to be able to
override the "++" and "--" meaning of the property, so that a 1 can be
added or subtracted internally more efficiently. However, I can't
imagine what the syntax could look like...
Ary
More information about the Digitalmars-d-announce
mailing list