Allow struct constructors with all parameters optional

Lance Bachmeier no at spam.net
Thu Aug 29 16:58:40 UTC 2024


On Thursday, 29 August 2024 at 13:57:05 UTC, ryuukk_ wrote:

> Are you seriously telling people to write a library to be able 
> to do what C already provides for decades?
>
> This is why nobody takes D seriously, all that code just to 
> initialize a struct
>
> Unbelievable, seriously

I'm saying the opposite. An intermediate-level D programmer can 
use modules and aliases in a straightforward way to accomplish 
the same thing, even on a third-party library that someone else 
wrote and that you don't want to change. The restriction isn't 
actually a restriction but an annoyance. It should be possible to 
do this within the struct itself.


More information about the dip.ideas mailing list