Am Tue, 15 Aug 2017 07:52:17 +0000 schrieb Gary Willoughby <[email protected]>:
> 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 > > I thought @property's behaviour had been removed from the > language and even though the attribute remains, it doesn't > actually do anything? > > You're probably thinking of the special optional/non-optional parenthesis rules and the -property compiler switch which was removed. @property should still be used according to the style guide: https://dlang.org/dstyle.html and as far as I can tell it's heavily used in phobos. Properties behave more like field variables in some traits: http://dlang.org/spec/traits.html https://dlang.org/phobos/std_traits.html But I think that's the only relevant difference between properties and normal functions right now. -- Johannes
