*** Welcome to piglix ***

Named parameter


In computer programming, named parameters, pass-by-name, or keyword arguments refer to a computer language's support for function calls that clearly state the name of each parameter within the function call.

A function call using named parameters differs from a regular function call in that the values are passed by associating each one with a parameter name, instead of providing an ordered list of values.

For example, consider this Java method call using no named parameters:

Using named parameters in Objective-C, the call can be written as:

The Java version is more concise. The Objective-C version is more explicit. Depending on a given instance, a programmer may find one or the other easier to read.

Named parameters are supported explicitly in many languages. A non-exhaustive selection of examples includes Ada, C# 4.0+, Ceylon, ColdFusion Markup Language (CFML), Common Lisp, Fortran, IDL, Kotlin, Mathematica, Objective-C, PL/SQL, Python, R, Ruby, Scala, Smalltalk, Swift, and Visual Basic.


...
Wikipedia

...