@property for simple methods?

Dennis dkorpel at gmail.com
Mon Apr 2 15:15:05 UTC 2018


On Monday, 2 April 2018 at 14:51:57 UTC, Vladimirs Nordholm wrote:
> Do you think I should I omit the @property tag, if the only 
> wanted behaviour is to set a value (`foo.bar = "baz";`) ?

You're probably fine either way, it's mostly for making your 
intention clear. Jonathan M Davis made a great explanation:
(https://forum.dlang.org/post/mailman.709.1481234980.9448.digitalmars-d-learn@puremagic.com)


More information about the Digitalmars-d-learn mailing list