CSE 130: Principles of Programming Languages
Notes on Chapter 8 of Sethi (functional programming and ML)

Lisp was developed by John McCarthy to address needs felt strongly by the AI community of that time (late 1950s) for a language that could do symbolic computations, not just numerical computations, to which the FORTRAN of the time was limited. Lisp is the first functional programming language, and the source of many important ideas that appear in all subsequent functional languages, such as higher order functions, functions as first class citizens, avoidance of side effects, garbage collection, user interaction, strong reliance on lists, and more. Lisp is still important in the AI community.

ML comes from "Meta Language," and it was originally designed to be the programming language for Robin Milner's LCF theorem proving system (LCF stands for Logic of Computable Functions, since it implemented a logic of that name due to Dana Scott). Today, LCF is of only historical interest, while ML has become quite important, and has been used in many different kinds of applications, in part because it has a good compiler, strong typing, and a good module system.

Both Lisp and ML are impure functional languages, in the sense that they do have an assignment statement; however, it is significantly de-emphasized in both languages, and in ML, its integration with the type system does much to make it less of a problem than in mainstream imperative languages. Moreover, there are applications where it is easier to get efficient code using assignments, and in any case, most programmers are more comfortable with imperative programming and innermost evaluation (i.e., call-by-value), so ML is convenient for gradually changing their habits (or not).

There is considerable overlap between this chapter and chapter 5, and indeed, chapter 5 goes into more detail on some topics. One of these is the renaming principle on page 163, which gives a more precise definition for use in the discussion of ML expression binding on pages 328-9 of Sethi.

To CSE 130 notes page
To CSE 130 homepage
Maintained by Joseph Goguen
© 2000 - 2005 Joseph Goguen
Last modified: Fri Feb 25 07:12:55 PST 2005