CSE341 Notes for Monday, 3/30/09

I spent about half of the class discussing the syllabus and my vision for the course. I mentioned that the great language wars have a long history in the computer science community.

I discussed a table of some of the major programming languages and approximately when they were invented:

+-----------------+-----------------+-----------------+----------------------+
| 1960            | 1970            | 1980            | 1990             2000|
+-----------------+-----------------+-----------------+----------------------+
| Fortran         |                 |                 | Matlab               |
+-----------------+-----------------+-----------------+----------------------+
| Cobol           | DBMS's          | SQL             | VB                   |
+-----------------+-----------------+-----------------+----------------------+
| Lisp            |         Scheme  | ML              |                      |
+-----------------+-----------------+-----------------+----------------------+
| Algol           | Pascal Smalltalk| Ada             |         Java     C#  |
|                 | C               | C++             |                      |
+-----------------+-----------------+-----------------+----------------------+
|         BASIC   |                 |         Perl    | Python  Ruby         |
|                 |                 |                 |         Javascript   |
|                 |                 |                 |         PHP          |
+-----------------+-----------------+-----------------+----------------------+
|                 | Prolog          |                 |                      |
+-----------------+-----------------+-----------------+----------------------+
I also mentioned that one of the major divisions predates computers. As far back as 1936 we had Alan Turing in England writing a paper about something called a Turing Machine that computes things by reading symbols from a tape and, depending upon the symbols, potentially writing new symbols to replace the old ones (something we call mutable state). Across the Atlantic that same year we had Alonzo Church at Princeton exploring the properties of functions and inventing something called the lambda calculus to characterize computation in a different way. The Turing approach inspired people to develop procedural languages like C, C++ and Java and the Church approach led people like John McCarthy to invent programming languages like Lisp (the first of the functional programming languages).

You are probably more familiar with the languages that grew out of the procedural approach because they are more often used in industry. But you've probably at least heard about some of the functional languages because they have loyal fans and they are used extensively in certain branches of computing like artificial intelligence. We will be studying two functional languages: ML, which is quite different from Lisp, and Scheme, which is a descendant of the original Lisp.

Some people wonder why we don't spend more time covering popular programming languages like C++. The problem with C++ is that it's not different enough from Java to be worth studying. It would be like taking a field trip to Spokane to find out how other people live. If we're going to stretch your minds, we need to travel to places like Tokyo and Beijing to see very different ways of living. I mentioned that in the computer science community the divide between functional programming and procedural programming is similar to the cultural division between East and West. So think of this course as your foreign language requirement or your overseas studies opportunity.

One final point I made is that even if some of the languages we study are not the most popular languages in industry, they still affect the lives of all programmers because they influence other languages. Java, for example, was designed by Jim Gosling but its development has also been influenced by Guy Steele. Steele has been at Sun since 1994, but prior to that he was the coinventor of Scheme with Gerry Sussman.

I then spent about half of the class in the ML interpreter typing in expressions and seeing how the interpreter responds. This kind of interaction is known as a repl (Read/Eval/Print Loop). It was pioneered by the functional camp but the approach is now common. For example, both Python and Ruby have similar environments and even Java has a primitive form of this in the interactions pane of the DrJava programming environment (developed by another fan of functional programming called Corky Cartwright who teaches at Rice). I pointed out that it is very important when working with the SML environment to pay close attention to the type information it gives you as you enter various expressions.


Stuart Reges
Last modified: Wed Apr 1 23:05:02 PDT 2009