I put this here because it's probably a flawed idea. A 'learn' level suggestion.
At present function arguments that you want to default must go at the end like so:
int fun(int a = 1, int b = 2, int c = 3)
{
return a + b + c;
}
fun(4); //Modifies a
where the default fields can only be fields after any argument provided. Why not allow something like:
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.

On Friday, 20 April 2012 at 11:09:30 UTC, Jacob Carlborg wrote:
> On 2012-04-20 11:17, Christophe wrote:
>> "Jakob Ovrum" , dans le message (digitalmars.D.learn:34948), a écrit :
>>> On Thursday, 19 April 2012 at 18:34:41 UTC, Jacob Carlborg wrote:
>>>>>>>> Named arguments would probably be better for this.
>>>>>>>> fun(c = 5);
>>>>>> Maybe so, but `fun(c = 5);` is not an additive change, while the
>>> OP's suggestion actually is.
>>>> How about
>>>> int c;
>> fun(c = 5);
>>>> ?
>>>> I don't know. Default arguments would probably take precedence perhaps.
That is exactly the problem though, it can silently change the behaviour of existing code. It is the worst kind of breaking change, hence I don't think it will ever be in D in this form, much less the current iteration of the language.

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