19 luglio, 2019

Notarelle storiche sul Lisp - 5


Continuo da qui l'esplorazione dagli inizi del Lisp.

Continuo l'esame di Recursive Functions of Symbolic Expressions and Their Computation by Machine, Part I, sono giunto a Another Formalism for Functions of Symbolic Expressions.

Considerazioni sulle espressioni simboliche, teoriche, non so se ci arrivo a capire per bene, comunque ecco:

There are a number of ways of defining functions of symbolic expressions which are quite similar to the system we have adopted. Each of them involves three basic functions, conditional expressions, and recursive function definitions, but the class of expressions corresponding to S-expressions is different, and so are the precise definitions of the functions. We shall describe one of these variants called linear LISP.

The L-expressions are defined as follows:
[...]

Non riporto ma volendo è là. Mi sembra tutto normale car viene chiamato first e cdr rest. C'è nil qui chiamato Λ.

The advantage of linear LISP is that no characters are given special roles, as are parentheses, dots, and commas in LISP. This permits computations with all expressions that can be written linearly. The disadvantage of linear LISP is that the extraction of subexpressions is a fairly involved, rather than an elementary, operation. It is not hard to write, in linear LISP, functions that correspond to the basic functions of LISP, so that, mathematically, linear LISP includes LISP. This turns out to be the most convenient way of programming, in linear LISP, the more complicated manipulations. However, if the functions are to be represented by computer routines, LISP is essentially faster.

Uh! capito: linear LISP rende macchinoso calcolare funzioni entro funzioni, quello che si fa normalmente.

Pausa, non per pigrizia ma voglio prenderlo a piccole dosi; e poi in questi giorni fa caldo, troppo.
🔴

Nessun commento:

Posta un commento