Why are there Properties in D?
Rikki Cattermole
alphaglosined at gmail.com
Sat Feb 15 17:24:36 PST 2014
On Sunday, 16 February 2014 at 01:21:21 UTC, Casper Færgemand
wrote:
> Does @property force you to call the function without parens?
> If not I don't really see what the keyword actually does.
@property does not force you to use parentheses.
@property myExample(int a) {}
It can be called via
myExample = a;
or
myExample(3);
I can't entirely remember the behaviour for no args on the first
syntax.
More information about the Digitalmars-d
mailing list