DIP23 draft: Fixing properties redux
Zach the Mystic
reachBUTMINUSTHISzach at gOOGLYmail.com
Mon Feb 4 19:18:42 PST 2013
On Sunday, 3 February 2013 at 08:16:08 UTC, Andrei Alexandrescu
wrote:
> Walter and I have had a discussion on how to finalize
> properties.
>
> http://wiki.dlang.org/DIP23
>
> We got input from DIP21 (which we didn't want to clobber, hence
> the new DIP) and the recent discussion.
>
> The proposal probably won't be accepted in its current form
> because it breaks some code. We hope to bring it to good shape
> with everyone's help.
>
> In brief:
>
> * Optional parens stay.
>
> * Just mentioning a function or method without parens does NOT
> automatically take its address. (This is a change from the
> current behavior.)
>
> * Read properties (using @property) work as expected with the
> mention that they may NOT be called with the parens. Any parens
> would apply to the returned value.
>
> * Write properties (using @property) may only be used in the
> assignment form (no function-style call allowed).
>
> It is understood that the current proposal is just a draft and
> there must be quite a few corner cases it doesn't discuss. We
> also understand it's impossible to reconcile all viewpoints and
> please all tastes. Our hope is to get to a point where the
> rules are self-consistent, meaningful, and complete.
>
>
> Destroy.
>
> Andrei
http://forum.dlang.org/thread/ririagrqecshjljcdubd@forum.dlang.org
Smash.
More information about the Digitalmars-d
mailing list