On Wednesday, 30 June 2021 at 20:12:29 UTC, H. S. Teoh wrote:
On Wed, Jun 30, 2021 at 07:40:40PM +0000, someone via
Digitalmars-d-learn wrote: [...]
@property int data() { return m_data; } // read property
[...]
string something() @property { return this.whatever; }
[...]
Now I am not sure which is the correct way.
[...]
Both are correct. :-) It's up to personal style preference.
T
@nogc unittest { } // works
unittest @nogc { } // doesn't work
https://dlang.org/dstyle.html doesn't suggest either way, but
does suggest alphabetical ordering(!) which I hadn't noticed.