In-place struct initialization

Salih Dincer salihdb at hotmail.com
Wed May 4 12:17:22 UTC 2022


On Tuesday, 3 May 2022 at 13:47:54 UTC, Paul Backus wrote:
> On Tuesday, 3 May 2022 at 09:56:36 UTC, test123 wrote:
>> consider this code:
>>
>> ```d
>> struct Test {
>>       string tag;
>>       string logger;
>>       bool profile;
>>       int verbose;
>> }
>> ```

```d
Test test = {
   verbose = 100,
   tag = "default",
   logger = "files...",
   profile = true
};
```
Will this use case remain in effect? A lot of its useful!

Thanks...



More information about the Digitalmars-d mailing list