RFC: Implementation of binary assignment operators (e.g s.x += 2) for @property functions
Jeremy DeHaan via Digitalmars-d
digitalmars-d at puremagic.com
Tue Aug 15 08:55:06 PDT 2017
On Tuesday, 15 August 2017 at 03:53:44 UTC, Michael V. Franklin
wrote:
> An implementation of binary assignment operators for @property
> functions has been submitted to the DMD pull request queue at
> https://github.com/dlang/dmd/pull/7079. It addresses the
> following issues:
>
> Issue 8006 - Implement proper in-place-modification for
> properties
> https://issues.dlang.org/show_bug.cgi?id=8006
> ------------------------------------------------------------------
> This is the primary issue motivating the pull request. The
> pull request is only a partial resolution of this issue; it
> implements binary assignment operators (e.g. `s.x += 2`), but
> not unary assignment operators (e.g. `s.x++`). The plan is to
> implement unary assignment operators in a separate pull request
> after the fate of the binary assignment operators pull request
> is decided.
I'm a huge fan of this, but then I am of the mindset that
@property functions should act like variables much in the way
that they do for C# properties.
More information about the Digitalmars-d
mailing list