Am Wed, 21 Mar 2012 03:30:02 +0100 schrieb "bearophile" <[email protected]>:
> > 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
