views:

133

answers:

4

Since named parameters are those parameters that are identified by their explicit name, instead of their ordering, what's the name of their cousins without names, the ones that are identified merely by the order?

Anonymous parameters? Unnamed parameters? Do they have a name to begin with?

+5  A: 

Parameters.

Jeff
They don't have a name, because they don't have a name. It makes sense!
Paul Tomblin
Or you are using FORTH
anon
Hm, I was hoping for something that would distinctly set them apart. Saying "there's named parameters and parameters" sounds confusing :/
Henrik Paul
+14  A: 

positional parameters.

If you google "positional parameters", you'll usually find it referring to the $1, $2, $3 variables you get in shell scripting, but it works for "normal" parameters as well.

Paul Tomblin
Seems like C# uses this term: http://msdn.microsoft.com/en-us/library/aa664614%28VS.71%29.aspx?ppud=4
Henrik Paul
+1  A: 

In Python, there are keyword arguments and arguments.

pts
+1  A: 

It's in the tutorial, kinda.

http://docs.python.org/tutorial/controlflow.html#keyword-arguments

In general, an argument list must have any positional arguments followed by any keyword arguments, where the keywords must be chosen from the formal parameter names.

And the glossary:

http://docs.python.org/glossary.html#glossary

argument

A value passed to a function or method, assigned to a named local variable in the function body. A function or method may have both positional arguments and keyword arguments in its definition.

positional argument

The arguments assigned to local names inside a function or method, determined by the order in which they were given in the call. * is used to either accept multiple positional arguments (when in the definition), or pass several arguments as a list to a function. See argument.

John Fouhy