Evolution-of-Lisp.pdf

(584 KB) Pobierz
main.dvi
c
1993 ACM 0-89791-571-2/93/0004/0231 ::: $1.50
::: in contrast to most languages, in which the language is rst designed and then
the pure list style, using EVAL as the top level. Interlisp, along with Lisp 1.5, used EVALQUOTE .
or, using the syntactic abbreviation x for (quote x ) ,
MacLisp forked o and used EVAL exclusively as a top level interface: BBN-Lisp (and thus Interlisp)
second form, then BBN-Lisp nished reading the second form and used the EVALQUOTE interface for
but as a function and (separately) a literal list of arguments. In hindsightwe see that the EVALQUOTE
the EVAL top level; the BBN-Lisp documentation brought out this symmetry explicitly. (Indeed,
ferences: (a) in Lisp 1.5, APPLY took a third argument, an environment (regarded nowadays as
for a faithful re ection of the lambda calculus); and (b) \ EVALQUOTE is capable of handling special
kluge [Raymond, 1991]. (Note, however, that MacLisp’s APPLY function supported this same kluge.)
the LEXPR case. Here is an example of how to de ne LIST , a function of a variable number of
variable arity functions suchas + . Though there is no semantic need for an n-ary + ,itisconvenient
(+ A (+ B (+ C D))) .
function ERR , which allowed user code to signal an error.
does cause an error, the ERRSET form quietly returns NIL .
MacLisp added the function ERR , which signals an error. If ERR is invoked within the dynamic
Programmers soon began to use ERRSET and ERR not to trap and signal errors but for more
trapped unexpected errors, making programs harder to debug. A new pair of primitives, CATCH
Zgłoś jeśli naruszono regulamin