Setting field of struct object

zjh fqbqrr at 163.com
Mon Jan 22 11:31:11 UTC 2024


On Monday, 22 January 2024 at 08:54:54 UTC, zjh wrote:

> ```d
> struct Person {
>     string name, email;
>     ulong age;
> }
> Person a{"n","email",33};
> ```


C++ can achieve ultimate `simplicity` without violating `DRY`,
And here, D violates the `DRY` principle!
Moreover, as the `package level, module level, class level, 
member level`, D language violates integrity.
Because D has no `class level` limit.
These are all not `serious states`.



More information about the Digitalmars-d-learn mailing list