Properties: a.b.c = 3
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Wed Jul 29 11:06:02 PDT 2009
Ary Borenszweig wrote:
> 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.
I don't think D allows expressions to the right of ".".
Andrei
More information about the Digitalmars-d
mailing list