Properties: a.b.c = 3

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Jul 29 10:50:28 PDT 2009


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.

One great thing about properties is that they are mostly interchangeable 
with fields. The a.b.c = 3 problem works against that.


Andrei



More information about the Digitalmars-d mailing list