A Mathematician's View of LISP

Vaughan R Pratt Assoc Prof of and Engineering MIT Laboratory for Computer Science 545 Technology Sq Cambridge MA 02139

All higher order languages offer the programmer distinctions. Typical devices are printers, keyboards, mechanisms for simplifying and clarifying programs. floppy disks, paper tape readers, and the like. Viewed from the distance that mathematicians such as The corresponding mechanisms available to the pro- myself prefer, away from the distractions of detail, LISP grammer for expediting this flow of data are fetch and stands out as the first language to pay serious attention to store instructions, parameter passing and value returning the following issues: constructs, and read and write commands. A mobile datum is one which can be moved from one Mobility of data. site to another by the program with a minimum of fuss. Modularity of function. Here are two tests for mobility of data: Declarative programming. Metalinguistics (the ability of a language to talk Width test. Must the data be moved piecemeal? For about language). example, on your microprocessor, can you move a 2 byte address around as a unit, or do you have to move each Since the development of LISP, two other languages byte separately? In your favorite language, can you read (APL and, to a lesser extent, SNOBOL) have joined LISP in an array from floppy disk or paper tape using one in dealing with at least some of these issues. As such, one instruction, or must you write a loop to read the array would assume that they would have improved on LISP. I elements individually? believe that LISP outclasses these languages despite its having been developed earlier. Other languages, such as Length test. Are intermediate sites needed to get data FORTRAN, BASIC, ALGOL, PL /I, and Pascal (or from one site to another? For example, to take the FBAPP as Professor Alan Perlis of refers logarithm of a number that the user types in from a to them collectively) are, in Perlis' opinion and mine, not keyboard, do you have to store the number in a variable in the same class as LISP and APL with respect to the first and then take its logarithm, or can you just say issues discussed here. (I do not know Professor Perlis' (LOG (READ)) as in LISP? opinion of SNOBOL.) If the data type fails either test it is not fully mobile. Mobility of Data Note that if it fails both, the effect can be multiplicative. In a computer, data flows between three major classes For instance, moving three bytes with each requiring two of sites: storage, functions, and devices. Storage consists steps, requires six steps altogether. of registers and main memory in assembly language, and It is often possible to enhance the mobility of data by variables (simple and subscripted) in higher level writing the appropriate subroutines. For example you languages. Functions (or procedures, or subroutines) are might write a routine to read an array from a device. This quite alike in all languages, though with minor technical observation shows that mobility is a concept that is relative both to the available con- structs and to the available software. About the Author: Promised mobility is the possibility of writing such Vaughan Pratt joined the MIT faculty in 1972 in the Department of subroutines. Promised mobility is not as good as real Electrical Engineering and Computer Science and is associated with the mobility, as it requires the programmer to do the work of Laboratory for Computer Science and Artificial Intelligence Laboratory. He received his PhD under at Stanford supplying the mobility, which may be more effort than it University (Shell Sort and Sorting Networks). He is currently the head is worth for the particular application the programmer of the Theory of Computation Section at the Laboratory for Computer has in mind. Science. His work includes natural language, algorithms, program One basis for classifying programming languages is the semantics, and verification. His hobbies include collecting, repairing, mobility of their types in the absence of and playing musical instruments and building robots. data additional subroutines such as the above mentioned one for reading

162 August 1979 © BYTE Publications Inc