Group: naming
Topic: calculator
Topic: curried functions
Topic: definition languages
Topic: immutable files and data
Topic: list processing
Topic: no need for replacement
Topic: reduction languages
Topic: reduction machines
| |
Summary
A number of languages do away with variables altogether. Examples are machine code, COMIT which uses a workspace for computation, reduction languages, definitional languages, and calculators. Variables are replaced by access functions, curried functions, macros, or temporaries. For instance the variables 'x' and 'y' in a function definition for 'succ (x)':
declare function succ (x:integer):integer; begin declare integer y; y := x + 1; return y; end;
can be removed by the curried function
'plus 1': declare function succ := plus 1;
Without variables the system's state can not be differentiated into components, instead the state is treated as a whole. (cbb 5/80)
Subtopic: state machines do not need names
Quote: while a programming language uses names, state machine semantics do not [»backJ_1972, OK]
| Subtopic: use macros instead of variables
Quote: a powerful macro processor can use macros in place of character variables [»browPJ_1969]
| Quote: instead of parameters, a macro can use its left and right context; arbitrary modifications (search outward from call) [»granCA12_1971, OK]
| Subtopic: children do not use variables
Quote: found children did not use variables, so removed assignments and variables; kept parameter passing, parameters, and an input variable [»mckeRM5_1984]
| Subtopic: functional program instead of variables
Quote: a functional program for matrix multiply does not name its parameters or intermediate results
| Quote: a functional program for matrix multiply contains no variables, no loops, no control statements, no initializations, no declarations
| Subtopic: global state instead of variables
Quote: AST systems can retrieve the whole state, retrieve the definition of a function, or compute the new state [»backJ8_1978a]
| Subtopic: examples
QuoteRef: backJ_1972 ;;11 red languages have no variables
| QuoteRef: sammJE_1969 ;;423 no variables, have a workspace and several shelves
| QuoteRef: turnDA1_1979 ;;33 x Given: "'def suc x= x+1 The aim is to eliminate the variable x obtaining a definition of the form ... 'def suc = 'plus 1.
| Quote: if variables are place holders then problems with self-reference and aliasing [»backJ_1972, OK]
| QuoteRef: sammJE_1969 ;;443 snobol has named string reference while comit has only workspace
| QuoteRef: sammJE_1969 ;;453 example #(ds, n, ##(cl,n)#(da)) calls n into working area, deletes all forms (da) then defines form n as original without segment gaps
|
Related Topics
Group: naming (32 topics, 789 quotes)
Topic: calculator (1 item)
Topic: curried functions (14 items)
Topic: definition languages (3 items)
Topic: immutable files and data (59 items)
Topic: list processing (15 items)
Topic: no need for replacement (4 items)
Topic: reduction languages (17 items)
Topic: reduction machines (14 items)
|