Optional function invocation parentheses
Will Rubin
Will.Rubin at zippymail.info
Thu Sep 20 06:00:51 PDT 2012
Thanks for the detailed reply. It's too early for me to have much
of an opinion but I'll take your approach and use @Property
without parens (as I would in C# for example) and stick with the
empty parens for non-property functions as it's a bit clearer to
see what's really going on at this right now.
A bit interesting to see I can declare a write property that
returns a value rather than void.
On Thursday, 20 September 2012 at 07:56:09 UTC, Jonathan M Davis
wrote:
>
> My guess is that what's going to happen is that eventually,
> @property
> functions will be forced to be called without parens (fixing
> the aforementioned
> problem with delegates) but that non- at property functions will
> be able to use
> parens or not as you please, but I don't know. Personally, I
> think that it
> should always be enforced that @property doesn't use parens and
> everything
> else does, but while plenty of people agree with me, plenty of
> others
> disagree. It's a very devisive subject. So, we'll just have to
> wait and see
> how it turns out.
>
> In the meantime however, you can use parens or not as you like.
More information about the Digitalmars-d-learn
mailing list