Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
January 10, 2019 Improvements to the annotation functionality | ||||
---|---|---|---|---|
| ||||
I want and I think: ```D struct A { int x = 1; int y = 2; int z = 3; string a = "a"; string b = "b"; this(int x, int y, int z, string a, string b) { this.x = x; thix.y = y; this.z = z; this.a = a; this.b = b; } } @A(1, 2, 3, "a", "b") void test1() { // TODO } @A(z=9, b="bbb") void test2() { // TODO } ``` Member assignments can be specified, seem test2(). |
January 10, 2019 Re: Improvements to the annotation functionality | ||||
---|---|---|---|---|
| ||||
Posted in reply to Brian | On Thu, 10 Jan 2019 04:46:28 +0000, Brian wrote:
> @A(z=9, b="bbb")
Named function parameters would give you that. There are a couple proposals floating around. Generalized struct initializer syntax would work, too.
|
January 10, 2019 Re: Improvements to the annotation functionality | ||||
---|---|---|---|---|
| ||||
Posted in reply to Brian | On Thursday, 10 January 2019 at 04:46:28 UTC, Brian wrote: > I want and I think: > > ```D > > struct A > { > int x = 1; > int y = 2; > int z = 3; > string a = "a"; > string b = "b"; > > this(int x, int y, int z, string a, string b) > { > this.x = x; > thix.y = y; > this.z = z; > this.a = a; > this.b = b; > } > } > > @A(1, 2, 3, "a", "b") > void test1() > { > // TODO > } > > > @A(z=9, b="bbb") > void test2() > { > // TODO > } > > ``` > > Member assignments can be specified, seem test2(). https://github.com/wilzbach/DIPs/blob/b1283b455b635d7dcbc2c871d2aa47cc67190059/DIPs/DIP1xxx-sw.md How can we proceed with this DIP? Kind regards Andre |
January 10, 2019 Re: Improvements to the annotation functionality | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andre Pany | On Thursday, 10 January 2019 at 06:41:54 UTC, Andre Pany wrote:
>
> https://github.com/wilzbach/DIPs/blob/b1283b455b635d7dcbc2c871d2aa47cc67190059/DIPs/DIP1xxx-sw.md
>
> How can we proceed with this DIP?
>
I've been in contact with Sebastian about it and he isn't ready to move forward with it yet. When he is, it will get priority because it's been there so long.
|
January 22, 2019 Re: Improvements to the annotation functionality | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike Parker | On Thursday, 10 January 2019 at 10:49:42 UTC, Mike Parker wrote:
> On Thursday, 10 January 2019 at 06:41:54 UTC, Andre Pany wrote:
>
>>
>> https://github.com/wilzbach/DIPs/blob/b1283b455b635d7dcbc2c871d2aa47cc67190059/DIPs/DIP1xxx-sw.md
>>
>> How can we proceed with this DIP?
>>
>
> I've been in contact with Sebastian about it and he isn't ready to move forward with it yet. When he is, it will get priority because it's been there so long.
Thank you! We need it to simplify development some framework.
|
Copyright © 1999-2021 by the D Language Foundation