@property needed or not needed?

Maxim Fomin maxim at maxim-fomin.ru
Mon Jan 28 09:20:12 PST 2013


On Monday, 28 January 2013 at 16:55:40 UTC, Dicebot wrote:
> On Monday, 28 January 2013 at 16:50:37 UTC, Maxim Fomin wrote:
>> Than value of this expression (note, that evaluated expression 
>> is not b, it is b = c) is assigned to a.
>
> Quoting you (that was exactly part of standard I was referring 
> too):
> "assignment expression has the value of the left operand"
>
> Left operand for (b = c) is b. Thus (b = c) has value of b. 
> Value of b is b.getter(). Thus compiler is re-writing it wrong 
> if we copy C rules.
>

Applying your logic:

Left operand for a = (b = c) is a. Thus a has value of (b = c). 
Value of b = c is b.setter(c.getter()).


More information about the Digitalmars-d mailing list