Variadic function: Difference between revisions

Content deleted Content added
Disambiguating nomenclature by using"adicity" rather than "arity"
remove personal essay
Line 10:
 
In [[PHP]], [http://php.net/functions_arguments variable-length argument lists] are natively supported (without security risk) since version 4; dedicated functions (<TT>func_num_args</TT>, <TT>func_get_arg</TT>, <TT>func_get_args</TT>) allow the programmer to determine the number and values of unspecified arguments.
 
==Suggestion on terminology==
 
In a wider context, it is recommended using the term ''[[adicity]]'' for the number of arguments of a function and reserve the term ''[[arity]]'' for the number of values that a function argument can take. In this way, terms such as ''binary functions'' and
''ternary functions'' would designate functions as found in
''binary algebra'' and ''ternary algebra'' (or ''binary logic'' and
''ternary logic'') respectively. By the same token, the adjectives ''monadic'' and
''dyadic'' can then refer in an orthogonal way to the number of arguments of such functions. For instance, the commonly used logical "not" denotes a monadic binary function, whereas "and" denotes a dyadic binary function (with appropriate ternary variants).
 
In this way, a more disciplined use of already existing terms avoids ambiguity and serves orthogonality.
 
(Suggestion added by Raymond.Boute@pandora.be)
 
==See also==