DIP23 draft: Fixing properties redux

TommiT tommitissari at hotmail.com
Sun Feb 3 08:16:12 PST 2013


On Sunday, 3 February 2013 at 16:03:50 UTC, Steven Schveighoffer 
wrote:
> On Sun, 03 Feb 2013 10:31:31 -0500, deadalnix 
> <deadalnix at gmail.com> wrote:
>>
>> If you want a function, then just don't annotate with 
>> @property. The whole point of property is that it doesn't 
>> behave like a function.
>
> That is not the point of properties.  The point of properties 
> is to have hooks for field setting and getting.  They 
> necessarily behave like functions.
>
> -Steve

That is not the point of properties. The point of setter and 
getter methods is to have hooks for field setting and getting. 
The point or properties is to have clearer semantics than what 
regular setter and getter methods would have.


More information about the Digitalmars-d mailing list