DIP23 draft: Fixing properties redux

Steven Schveighoffer schveiguy at yahoo.com
Sun Feb 3 08:03:52 PST 2013


On Sun, 03 Feb 2013 10:31:31 -0500, deadalnix <deadalnix at gmail.com> wrote:

> On Sunday, 3 February 2013 at 15:16:30 UTC, Steven Schveighoffer wrote:
>> But the spirit of the proposal seems to suggest that for all intents  
>> and purposes, a property's type is the type of it's return value.
>>
>
> 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


More information about the Digitalmars-d mailing list