Talk:Named parameters

Revision as of 07:56, 29 June 2009 by rosettacode>Dkf (→‎Duplication?: Crikey! What a mess in this area, probably caused by the task creator not knowing enough different languages)

Duplication?

You don't seem to have adequately expressed the difference between this task and Varargs/Optional parameters. If you take away the TCL example, what is left? Is the task to show arguments being given in a call in a different order to that of the definition? Are default values necessary? Do we need to overhaul all three tasks and work out what aspects of function arguments we need to show/how many tasks to do it? --Paddy3118 05:58, 29 June 2009 (UTC)

There is some duplication, yes, but it seems that the Optional parameters task was written by someone who wasn't aware of the possibility of optional positional parameters, which some languages support, so leaving that task still ambiguously defined. I'm trying to decompose features in this area so that these assumptions are teased out, and the naming of parameters is actually independent of supporting variable numbers of them (witness Objective C). Another justification for having them separate is that being able to set parameters by name leads to a different, far more literate programming style to setting them purely by position.
Also note that the Tcl example in the Optional parameters task is wrong; there's another mechanism (optional positional parameters) that should be demonstrated there instead. I'll have to correct that. Bother… —Donal Fellows 07:56, 29 June 2009 (UTC)
Return to "Named parameters" page.