Code style for property
Andrey via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Mar 12 13:12:50 PDT 2017
On Sunday, 12 March 2017 at 17:50:41 UTC, Stefan wrote:
> On Sunday, 12 March 2017 at 10:47:35 UTC, Andrey wrote:
>> Hello, how better to declare properties, for example I have
>> class:
>>> class Foo {
>>> this(in int x, in int y, Bar bar) {
>>> this.x = x;
>>> this.y = y;
>>> this.bar = bar;
>>> }
>>> private:
>>> int x;
>>> int y;
>>> Bar bar;
>>> }
>
> Andrey, you could try https://github.com/funkwerk/accessors
> We use it to avoid clutter.
>
>
> Stefan
Wow! that's great! thank you so much!
More information about the Digitalmars-d-learn
mailing list