Official deprecation dates, -property

Marco Leise Marco.Leise at gmx.de
Fri Mar 30 08:45:24 PDT 2012


Am Wed, 21 Mar 2012 03:30:02 +0100
schrieb "bearophile" <bearophileHUGS at lycos.com>:

> > Here  I have used () on a property. Currently -property 
> > enforces the usage of () on non-properties. But my logic tells 
> > me that it should also do the opposite and show an error if you 
> > use () with a @property method. What do you think?
> 
> Here Jonathan M Davis has reminded me that TDPL asks for this 
> second part too of the property enforcement:
> 
> http://d.puremagic.com/issues/show_bug.cgi?id=7723#c4
> 
> Bye,
> bearophile

IIRC a.functionPtrProperty()(); is required to call a function pointer stored in a property? To me a @property is a getter/setter where the setter takes one parameter and the getter has no arguments. By that logic only the syntax without () is required and ambiguities are avoided. (That's me being influenced by Delphi and C# properties)

-- 
Marco



More information about the Digitalmars-d mailing list