DIP 1019--Named Arguments Lite--Community Review Round 1

FeepingCreature feepingcreature at gmail.com
Thu Feb 28 09:40:07 UTC 2019


On Thursday, 28 February 2019 at 09:22:31 UTC, Dominikus Dittes 
Scherkl wrote:
> A function taking more than 2 parameters is a design flaw on 
> its own, I think. Let alone adding new parameters 
> _in_the_middle_ (shudder). You should almost always be better 
> off taking a struct as parameter.

Considering D is billed as a multiparadigm language, I'd be 
surprised to hear that the intended usecase does not include 
"functions with more than two parameters". This comment seems 
quite far from practiced reality. In any case, passing a struct 
is a horrible solution, because, again, there is no way for 
structs to even enforce that *all* fields were set, let alone 
some subset, short of spamming Nullable.



More information about the Digitalmars-d mailing list