Allow empty field function arguments for default?
bearophile
bearophileHUGS at lycos.com
Fri Apr 20 06:27:09 PDT 2012
ixid:
> fun( , 4, ); //Modifies b
> fun( , , 5); //Modifies c
>
> for when you want to call fun with other fields not being
> default? This would seem more flexible and pretty clear what is
> intended.
I think that for the programmer's eye it's easy to miss one or
more of those commas, when reading code. So to me something like
this seems significantly less bug-prone:
fun(void, 4, void); // Modifies b
fun(void, void, 5); // Modifies c
Bye,
bearophile
More information about the Digitalmars-d-learn
mailing list