record: C# like records for D

Dylan Graham dylan.graham2000 at gmail.com
Fri Jul 16 13:21:27 UTC 2021


On Friday, 16 July 2021 at 13:14:22 UTC, Dylan Graham wrote:
> On Wednesday, 14 July 2021 at 23:16:05 UTC, Dylan Graham wrote:
>> [DUB](https://code.dlang.org/packages/record)
>> [Github](https://github.com/hmmdyl/record)
>
> ```D
> module myapp;
>
> class A{}
> auto MyRecord = record!(get!(A, "a")); // would throw an error 
> as it could not find A
> ```

That should read
```D
[...]
alias MyRecord = record!(get!(A, "a")); // would throw an error
```


More information about the Digitalmars-d-announce mailing list