The Roots of Lisp
This week
we made an analysis on the article “The Roots of Lisp” by Paul Graham. I thoroughly
enjoyed this article because for mi it’s like an origin story for the most
powerful programming languages out there. And it also makes a point of how by
understanding the past of this language, you are also understanding the future
of programming languages.
In this
article, Graham tries to explain how the first published version of Lisp works
by tearing its basic functions and attributes apart and explaining each of them
by separate.
First he
starts with the seven primitive functions (quote, atom, eq, cons, car, cdr and cond), and show
how each of this functions perform super basic operations on the attributes
that are passed to them. It’s very interesting to see that every operation that
you want Lisp to perform can be done with just combinations of this primitive
functions.
Then he
tells us about the notation for describing our own functions, and how this
notation allows us to define recursive functions, which is one of the greatest
tools of programming. And with this notation he defines new functions that are
based on the seven primitive ones, like and or not.
What he
does next is probably the most interesting part of this article. He defines and
explains each part of the ‘eval’ function, that according to another article
(cant’ quite remember which one) is the heart of Lisp. It’s the function that
makes everything work. And here we can see why. Eval has a way of breaking a
function apart into the seven primitive functions.
I find this
eval function extremely impressive, how something so simple can actually do
anything in a few lines of code. This is just what every other article talked
about, this is code turned into math. That’s why I do believe Lisp is the
future of programming.
Comentarios
Publicar un comentario