The Roots of Lisp
The article "Roots of Lisp" written by Paul Graham, helps us understand what John McCarthy discovered from a handful of simple operations and notation for functions, that later evolved in a programming language: Lisp (because of "list processing").
The Lisp Model is a consistent model of programming, what McCarthy discovered is a landmark in the history of computers, and in what programming is becoming in our days.
First, we have seven primitive operators: quote, atom, eq, car, cdr, cons y cond. It was very easy to understand its operation, I am familiar with some of them, although in Clojure they have different names (like first and rest).
Then we have the functions, that are expressed with parameters and expressions. An expression whose first element is an expression is called a function call, this means that the parameters can be used both as operators or as arguments in expressions. Knowing this, we have a way of expressing new functions in terms of the seven primitive operators like null, and, not, append, pair and assoc.
The surprise? You can write a function that acts as an interpreter for our language: a function that takes as an argument any Lisp expression and returns its value. Remember Eval? Graham is responsible for breaking down the entire function and explain it in a detailed and detailed way.
Do you understand how extraordinary this is? Using only quote, atom, eq, car, cdr, and cons, it was possible to define a function, eval. Graham tells us that by understanding eval you will be understanding what is probably the main computational model in the future.
I found the article difficult to read, maybe the reason was that it seemed quite formal and different to the other texts of Graham that I read before. Some of the information that is provided to us in the article, I already knew it. However, it is always good to reinforce and expand knowledge.
Comments
Post a Comment