BYTE — August 1979
From the originals
13 scansMachine-transcribed text and image descriptions. Check the linked original for uncertain words or fine print.
These are transcribed pages from the documents, not the full publications. Open the original for the remaining pages.
PDF page 12
An Overview of LISP John Allen Signe tics 811 E Acques Ave Mail Stop 38 Sunnyvale CA 94086 LISP is a higher level machine language. LISP is simple and difficult, elegant and ad hoc; it is a beautiful blend of foresight and fortuity. LISP is a pro gramming language, often characterized as a special pur pose list-processing language. But LISP is no more a special purpose programming language than mathematics is a special purpose language for floating-point computa tions . Just as there's more to mathematics than the accounting and bookkeeping properties present in "general purpose" programming languages, there's much more to LISP than "just another programming language." The best description of the LISP programming lan guage is that it is a high level machine language. That is, it shares many of the facets of contemporary machine language -the necessity for attention to detail and the freedom to manipulate the machine's data and programs without restriction- yet LISP is high level in that the language contains the expressive power and convenience of traditional high level languages. The contradiction is resolvable: a LISP machine is just a higher level machine whose data items are organized differently from the binary bit patterns of most machines, and the LISP pro gramming language is the assembly language for this machine. LISP Data Structures Before introducing the constructs of the language, we must discuss the data items of the language . In a tradi tional language we would find numeric constants . In LISP, the analogous constants are called atoms. An atom is either a numeral or a literal atom -a string of upper case alphanumeric characters such that the first character in the string is an alphabetic character. For example, ABC123 , 12, and NIL are atoms, but 1A2 and (A B) are not. LISP also has composite constants called lists. Lists are built out of atoms and other lists as follows : • Any atom or list can be an element of a list. • Given any collection e,, . .. , e. of list elements, then (e, ... e. ) is also a list. So, (A B) is a list; as is (A BC), and (A 1 (ABC 23)). The About the Author John Allen, ou r gues t editor for this special LISP th em e iss ue, is th e author of th e boo k Anatomy of LISP and currently p roduct enginee r at Sign etics Corporation . He is also founder of Th e LISP Compan y , an organization to produ ce LISP related produ cts. last example is a list of three elements; its third element is also a list - of two elements : the atom ABC and the numeral 23. Atoms and lists are the basic LISP data structures . However, a robust production version of LISP includes many more data objects including arrays , arbitrary preci sion numbers , strings, and representation of functions as data objects . Regardless of the scope of the data represen tations in a specific LISP implementation, it is a fund amental property that all data objects are "first class ob jects," constructible, testable and available without restriction. This uniform behavior of data is a property shared by few other languages. First We need some operations on these data structures . Just !iS we should have a subtraction operation in arithmetic machines to decompose numbers, we have LISP instruc tions to decompose lists . One such operation is first ; it ex tracts the first element of a list. For example : first{(A B C)j gives: A This example is written in LISP's external syntax called meta-LISP or M-LISP; it is an instance of prefix notation . The programming language, the internal notation , is called S-expression LISP or S-LISP. Initially, we will pre sent algorithms in M-LISP since it is closer to traditional programming notation. However, since S-LISP is our machine language we will insist on developing facility with that notation. In a traditional architecture , both instructions and data are stored in memory . The processor usually has com plete freedom to manipulate any of these objects as either data or instructions. An object accessed by the instruc tion counter is interpreted as an instruction; other ac cesses to items usually imply a data interpretation. One goal is the representation of LISP instructions as data items in the LISP machine such that the processing unit of the LISP machine will have equal flexibility in inter preting the encoded information . An object may some times play the role of program, and sometimes of data . To represent program as data we must specify a translation of each M-LISP instruction into a list representation : External Notation <operation> /<operand> , ; .. . ; < operand> .} List Notation (<operation> r <operand>, r .. . <operand> . r) 10 August 1979 © BYTE Publi ca tions Inc Circle 255 on inquiry card .~
Reading notes: OCR-style hyphenation and spacing artifacts in the source text, such as 'pro gramming' and 'Signe tics'
- Printed dates
- 1979
- Languages
- English