Talk:Named parameters: Difference between revisions

From Rosetta Code
Content added Content deleted
(→‎Duplication?: Crikey! What a mess in this area, probably caused by the task creator not knowing enough different languages)
(→‎Duplication?: expressing concern over overly narrow tasks)
Line 5: Line 5:
: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.
: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… —[[User:Dkf|Donal Fellows]] 07:56, 29 June 2009 (UTC)
: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… —[[User:Dkf|Donal Fellows]] 07:56, 29 June 2009 (UTC)
::When I wrote [[Optional parameters]] it was my intent that positional optional parameters were included in it; the text even says so. It was designed to be accomplished in many different ways (as opposed to, say, this task, which specifies the particular concept of named parameters).<br>I am concerned that the idea you mention of "decomposition" of features leads to many tasks which demonstrate single language features/properties, and entirely leave out languages which simply do not have those features -- and the whole point of RC is ''comparative'' programming, so this is undesirable; we should aim to have tasks which many languages can implement, ''using their own particular facilities''. --[[User:Kevin Reid|Kevin Reid]] 13:39, 4 July 2009 (UTC)

Revision as of 13:39, 4 July 2009

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)
When I wrote Optional parameters it was my intent that positional optional parameters were included in it; the text even says so. It was designed to be accomplished in many different ways (as opposed to, say, this task, which specifies the particular concept of named parameters).
I am concerned that the idea you mention of "decomposition" of features leads to many tasks which demonstrate single language features/properties, and entirely leave out languages which simply do not have those features -- and the whole point of RC is comparative programming, so this is undesirable; we should aim to have tasks which many languages can implement, using their own particular facilities. --Kevin Reid 13:39, 4 July 2009 (UTC)