Re: Setting field of struct object

2024-02-01 Thread TheTeaLady via Digitalmars-d-learn
On Monday, 22 January 2024 at 11:31:11 UTC, zjh wrote: 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

Re: Setting field of struct object

2024-02-01 Thread TheTeaLady via Digitalmars-d-learn
On Monday, 22 January 2024 at 15:47:23 UTC, bachmeier wrote: On Monday, 22 January 2024 at 15:45:45 UTC, zjh wrote: On Monday, 22 January 2024 at 15:33:01 UTC, ryuukk_ wrote: it only took me 1 project to never want to touch C++ again.. D language used to have no `copy constructor`, isn't it