About Lisp and Robert Floyd
Here in JackBe we are starting to use Lisp, actually Scheme. And it happened that I had to elaborate in defense of this tech decision. I found a number of good reasons for addressing some kind of problems using this language. But, my friend Gerardo Horvilleur today posted a impressive note on his blog that deserves to be read by everybody who wants to take advantage of technology on behalf of business or pleasure itself.
It is in Spanish, so I will try to resume in English what he posted.
There are two main aspects he is trying to underline in his post:
- There is a way to classify Programming Languages (PLs) that is not very common but leads us to realize some huge benefits of a category of PLs that commonly aren’t evident using other grouping strategies. That is to classify them based on the way a parser or compiler reads a program. And Gerardo make us to remember that there are two separate ways to do that: the Algol way and any other. Whereas Algol way differentiates from any other in that it does lexical and then sintactical analysis based on the language grammar. On behalf of this classification all those popular languages are grouped in one category (Java, C#, C, C++, Pascal, JavaScript, Eiffel, Basic, Python, Ruby and even Perl). And in the other category we have Common Lisp, COBOL, Fortran, Smalltalk, APL and Scheme among others.
- He quotes the main reasons Robert Floyd was awarded with the Turing Price as well as the lecture he used when he received the price. And it is amazing.
Here are the main reasons Robert Floyd was awarded with the Turing Price.
“Helping to found the following subfields of computer science: the theory of parsing, the semantics of programming languages, automatic program verification, automatic program synthesis and analysis of algorithms. Floyd implemented one of the first Algol 60 compilers, finishing his work on this project in 1962. In the process, he did some early work on compiler optimization. Subsequently, in the years before 1965, Floyd systematized the parsing of programming languages. For that he originated the precedence method, the bounded context method, and the production language method of parsing.”
So he was awarded because he invented all the Algol sintaxis and the technologies related with it.
But what is amazing is the message he gave in the lecture he read when receiving the price. Here is a fragment of it:
“Contact with the programming written under alien conventions may help. Visiting MIT on sabbatical this year, I have seen numerous examples of the programming power which Lisp programmers obtain from having a single data structure, which is also used as a uniform syntactic structure for all the functions and operations which appear in programs, with the capability to manipulate programs as data. Although my own previous enthusiasm has been for syntactically rich languages like the Algol family, I see now clearly and concretely the force of Minsky’s 1970 Turing Lecture, in which he argued that Lisp’s uniformity of structure and power of self-reference gave the programmer capabilities whose content was well worth the sacrifice of visual form.”

Mucha gente considera que Lisp es abominable debido a su estructura sintáctica (abundancia de paréntesis, código difícil de leer para los humanos, etc.). Yo considero que su riqueza se halla en su semántica asi como en las estructuras de datos que pueden fácilmente ser creadas con este lenguaje. Sin embargo, es importante saber el tipo de business problem que se pretende resolver con este lenguaje. Si bien la gente se inclina mucho en estos días por OOP, yo aun no veo que hayan problemas del mundo diario que ameriten ser resueltos por OOP (y estoy seguro que esto va a levantar polémica entre mucha gente): más bien considero que es una decisión puramente tecnológica (la cual recae en los tecnólogos que deciden con qué resolver un problema). En términos de negocios es irrelevante el polimorfismo, la herencia, etc. En el caso de Lisp, considero que hay aplicaciones que se ven beneficiadas por las características del lenguaje, y otras que son entorpecidas por una mala elección del lenguaje. Refiriéndome a Lisp particularmente, me entusiasma mucho el que con poco código es posible construir aplicaciones elegantes y “magicas”.
Comment by Joe — August 11, 2005 @ 6:39 pm
Temo decepcionarte Joe, pero Lisp ha incluido el tema de Orientación a Objetos desde hace más de 15 años. De hecho a finales de los 70s y principios de los 80s, gracias a la influencia que las ideas de orientación a objetos tuvo sobre Lisp, se diseñó CLOS (Common Lisp Object System) que luego fue desarrollado para el tema de la estandarización. También debemos recordar que fue Xerox mismo quien desarrolló por esa época Smalltalk que tampoco pertenece a la familia Algol y que sin duda es un lenguaje ejemplar en términos del paradigma de orientación a objetos.
Más aún, el ANSI Common-Lisp fue el primer lenguaje orientado a objetos que obtuvo una certificación ANSI en 1995.
No hay que confundir el paradigma de orientación a objetos con el tema de la forma como se lee y parsea un programa. Son cosas totalmente independientes. En efecto tenemos lenguajes de programación orientados a objetos dentro y fuera de la familia Algol.
Comment by justavo — August 13, 2005 @ 4:34 pm
Precisando: LISP nace en 1958. Solo fué hasta 1989 que nace CLOS (treinta y un años después). Haciendo un paréntesis, en 1984 nació Common LISP. Y ya para terminar de ser sangrón, el 8 de diciembre de 1994 fué Common LISP ANSI.
Comment by Joe — August 15, 2005 @ 4:12 pm
Creo que una de las cosas más importantes de todo lenguaje de programación es que cubra las expectativas del nicho para el cuál fue concebido y que, adicionalmente, provea las utilerías necesarias para facilitar las actividades que con él se deseen realizar.
Siendo estrictos, el conjunto de programas que se pueden hacer entre un lenguaje de programación de propósito general X y otro Y, es equivalente.
Considero que Scheme llena un nicho de programación en muchos sentidos, por un lado está el asunto teórico, de tener un modelo de programación formal llamado cálculo lambda y poder hacer la transcripción casi literal del modelo formal a un programa, por el lado está el asunto práctico, de que las funciones son “ciudadanos de primer orden” en dicho lenguaje, es decir, que las funciones, pueden recibir y devolver referencias de otras funciones, cosa que no es implícito en lenguajes tipo Algol.
Finalmente, creo que la idea detrás de cualquier paradigma es condicionar la manera en la que “razonas” la solución de un problema, por lo que creo que es recomendable conocer y programar con diferentes técnicas para poder distinguir en qué momento cada una de ellas es la mejor para el problema que se pretende resolver.
Comment by Mefisto — August 16, 2005 @ 4:05 pm
Me sumo al ultimo párrafo que escribe el buen Mefisto. Tomemos en cuenta que un lenguaje de programación es algo asi como la “interfaz de usuario” entre nuestro razonamiento (y nuestro lenguaje) y el lenguaje máquina (no estoy ninguneando a los compiladores, pero para este propósito ellos simplemente me importan un comino).
Comment by Joe — August 16, 2005 @ 6:35 pm
Hi, I was just wondering why you chose Scheme (to use at your company) instead of Common Lisp. I’m not trying to start anything, I’m just genuinely curious.
Thanks.
Comment by Eric — September 16, 2005 @ 9:35 am
I think that because of Kawa. Kawa offers all the benefits of Java and Scheme at once. That’s a benefit you can’t take advantage of.
Kawa is:
1.A framework written in Java for implementing high-level and dynamic languages, compling them into Java bytecodes.
2.An implementation of Scheme, which is in the Lisp family of programming languages. Kawa is a featureful dialect in its own right, and additionally provides very useful integration with Java. It can be used as a “scripting language”, but includes a compiler and all the benefits of a “real” programming language, including optional static typing.
3.Implementations of other programming languages, including XQuery (Qexo) and Emacs Lisp (JEmacs).
Comment by justavo — September 18, 2005 @ 12:29 am