@property needed or not needed?

monarch_dodra monarchdodra at gmail.com
Mon Nov 19 07:18:11 PST 2012


On Monday, 19 November 2012 at 14:58:29 UTC, Andrei Alexandrescu 
wrote:
> On 11/19/12 4:01 AM, monarch_dodra wrote:
>> I kind of agree with Jonathan here. @property really shines 
>> when you
>> want to "add" an attribute to a struct.
>
> I kind of agree with him, too, but it would be a mistake to not 
> reckon a change in dynamics. UFCS makes all those extra parens 
> just awkward, and people will vote with their code regardless 
> whether some particular viewpoint from some particular angle 
> considers the approach backwards.
>
> Andrei

One of the things that we may want to take into account, is that 
-property prevents any existing function from migrating to/from 
property. For example, if we want to make "retro" a property, we 
can't without breaking any and all UFCS usage of retro.



More information about the Digitalmars-d mailing list