Properties: a.b.c = 3

Ary Borenszweig ary at esperanto.org.ar
Wed Jul 29 10:54:53 PDT 2009


Andrei Alexandrescu wrote:
> Bill Baxter wrote:
>> Yeh, I don't understand how any of this has anything to do with
>> properties.  It's the same question if you ask what should
>>
>>  a.b().c = 5
>>
>>  do.  It's the same issue whether you have properties or not, and
>> needs a solution whether you have properties or not.
> 
> Well the problem is that a.b().c = 5 makes it clear that there's a 
> function call in the mix, so the field-like behavior is not necessarily 
> to be expected.

No. Whenever you do

Expression1 . Expression2 . Expression3 = Expression4.

and Expression 2 is a struct type, and Expression 3 is not a static 
field of the struct, that should be an error.



More information about the Digitalmars-d mailing list