@property - take it behind the woodshed and shoot it?

Dicebot m.strashun at gmail.com
Mon Jan 28 05:34:31 PST 2013


On Monday, 28 January 2013 at 13:30:33 UTC, Adam D. Ruppe wrote:
> On Monday, 28 January 2013 at 08:14:45 UTC, Dicebot wrote:
>> Sure, it is for compiler. And it for me if I check the 
>> definition of symbol.
>
> However, as long as we have properties *at all* you'd have to 
> check it. If we removed optional parens and put in C# style 
> property syntax, it is still possible .anything is a function 
> call.

No, I am repeating this again and again - when I see a property I 
need to think it is a variable. It is intended fooling of the 
reader and reason to have properties. Thus no checking in that 
case, I just assume it is a field or variable or anything like 
that.

And if I'll spend few days debugging the case that comes down to 
my colleague has designed a property that does not behave like a 
field - I'll go and politely ask to stop doing this. May be also 
will punch him. Problem solved.


More information about the Digitalmars-d mailing list