As part of my year’s learning goals, I’ve started reading Peter Norvig’s Paradigms of Artificial Intelligence Programming. I’ve gotten through the first few chapters (introductions to Lisp and a small sample program), and so far it’s a great book. Now, since I’m a cover-to-cover kind of guy, I even read the introduction, and I’m sure glad I did. There’s a great money quote that I’ve never seen anyone reference that is so self-explanatory I’ll just shut up and quote it:
“There is a myth that Lisp (and Prolog) are ‘special-purpose’ languages, while languages like Pascal and C are ‘general purpose.’ Actually, just the reverse is true. Pascal and C are special-purpose languages for manipulating the registers and memory of a von Neumann-style computer. The majority of their syntax is devoted to arithmetic and Boolean expressions, and while they provide some facilities for forming data structures, they have poor mechanisms for procedural abstraction or control abstraction. In addition, they are designed for the state-oriented style of programming: computing a result by changing the value of variables through assignment statements.”
“Lisp, on the other hand, has no special syntax for arithmetic. Addition and multiplication are no more or less basic than list operations like appending, or string operations like converting to upper case. But Lisp provides all you will need for programming in general: defining data structures, functions, and the means for combining them.”
This is like the statement in the Preface of the Structure and Interpretation of Computer Programs:
“Underlying our approach to this subject is our conviction that ‘computer science’ is not a science and that its significance has little to do with computers. The computer revolution is a revolution in the way we think and in the way we express what we think. The essence of this change is the emergence of what might best be called procedural epistemology — the study of the structure of knowledge from an imperative point of view, as opposed to the more declarative point of view taken by classical mathematical subjects. Mathematics provides a framework for dealing precisely with notions of ‘what is.’ Computation provides a framework for dealing precisely with notions of ‘how to.'”
I had read the SICP quote before and knew it was important, but Norvig’s quote made it clearer for me.
Fortunately, the gulf between programming languages isn’t as great as it was in 1992 when PAIP was published. While languages like C and C++ are hard to beat for performance and OS interaction, newer languages like Python and Ruby (and even Java/C# with garbage collection) deal more with computation than direct hardware manipulation. Fortunately they haven’t followed Lisp in all ways!