In-place struct initialization
test123
test123 at gmail.com
Wed May 4 11:55:06 UTC 2022
On Tuesday, 3 May 2022 at 13:47:54 UTC, Paul Backus wrote:
> This will be covered by DIP 1030, "Named Arguments":
>
> https://github.com/dlang/DIPs/blob/master/DIPs/accepted/DIP1030.md
>
> The DIP has already been accepted, and work is currently
> in-progress to implement it in the compiler. Once it is
> finished, you will be able to write code like the following:
>
> ```d
> @Test(verbose: true)
> void doTest() {
> // ...
> }
> ```
This will work for most use case, if you add a verbose this
__ctor to struct all struct.
If D support In-place struct initialization , then the __ctor is
no need for a lot case.
More information about the Digitalmars-d
mailing list