Map
Index
Random
Help
Topics
th

Topic: parameter passing by keyword or position

topics > computer science > data > Group: parameters



Group:
naming

Topic:
attribute-value pairs as information
Topic:
function syntax definition
Topic:
namespace

Summary

A procedure call associates arguments with parameters usually by position in a comma list. Sometimes operation words or noise words are interspersed with arguments. Free format specification is provided by keywords or parameter names. Despite their readability and default values, keywords have not been widely adapted. They are especially clumsy when used for one argument procedures. Some programming systems allow both positional and keyword arguments. (cbb 5/80)
Subtopic: keyword selectors up

Quote: Smalltalk identifies keyword selectors by a trailing colon; concatenates them
Quote: the selector of a Smalltalk message can be keywords before each argument [»xlrg8_1981]
Quote: XPOP uses blanks, noise words, and cue words to convert statements to operator/operand form [»halpMI1_1968, OK]
Quote: a data file without names is meaningless; a NAMELIST gives the name for each data item [»branR9_1981]
QuoteRef: franN8_1977 ;;605 differentiate between value and name keyword parameters by call P (name-key = arg1... value-key:=arg2)

Subtopic: operators up

QuoteRef: gescCM6_1975 ;;37 v.rho <-r is seen as rho[v,r] and looks for a procedure rho with appropriate types. also a+b is plus[a,b]

Subtopic: macro calls up

Quote: instead of parameters, a macro can use its left and right context; arbitrary modifications (search outward from call) [»granCA12_1971, OK]
QuoteRef: browPJ10_1967 ;;619 macro calls start and end with a name followed by arguments separated by deliminators with alternatives
QuoteRef: memorex ;;10-2 macro call formats: macro operands (can also reference the label on the macro call), either positional or keyword (a default
QuoteRef: browPJ10_1967 ;;622 key arguments to deliminators and may test for argument deliminators present
QuoteRef: bennRK6_1968 ;;4-3 key word quotes for fixed length by keyword to indicate a position and a keyword terminator eg for i=1 to 10 by 2 do == for (i,1,10,2)

Subtopic: operand list up

QuoteRef: memorex ;;10-8 comma list with parentheses bracketing is an operand sublist. &arg1(2) is the second sub-operand

Subtopic: problems with keywords up

Quote: keyword arguments are most useful in poorly written code; functions should have at most two arguments

Related Topics up

Group: naming   (32 topics, 789 quotes)

Topic: attribute-value pairs as information (57 items)
Topic: function syntax definition (17 items)
Topic: namespace
(19 items)


Updated barberCB 10/04
Copyright © 2002-2008 by C. Bradford Barber. All rights reserved.
Thesa is a trademark of C. Bradford Barber.