This column should be of great interest to programming language aficionados. Everyone else should probably go on to the next article. As a functional programming language, ML differs greatly from imperative languages such as C. Here are two descriptions from "Principles of Functional Programming" (Glaser, et al.; Prentice Hall, 1984):

So, where an imperative program might say "Do this; Do that.", a functional program would say "Construct one of these from one or more of those.". Now, let's look at ML itself. The "ML Primer" (Stansifer, Prentice Hall, 1992) says:

ML has become very popular among functional programmers. Standard ML appears to be the most popular version, but several alternative definitions and implementations are available.

Standard ML

Start with Standard ML of New Jersey (SML/NJ). It is a complete language system (about 23 MB, compressed), including source code, documentation, and contributed software. SML/NJ can be found in The directory also includes Concurrent ML (CML), described in the announcement as follows:

You might also look at the Standard ML to C compiler, available in The distribution takes up about 7.5 MB (compressed), and includes source code, documentation, associated tools, and a test suite.

Be sure to pick up the Edinburgh Standard ML Library, stored in The library is small (less than 1 MB, compressed) but contains over 200 functions on several basic types, including sets, hash tables and the built-in types.

Finally, check out the ML Kit, stored in As described in the announcement:

A Caravan of CAMLs

Developed at the INRIA research facility in France, CAML (Categorical Abstract Machine Language) is a functional language in the ML family. Like ML itself, it has spawned a series of descendents.

The CAML distribution is archived in CAML Light, a variant for smaller machines (PCs, etc.), is archived in As the CAML Light README says:

For adventurous (strong?) types, Inria offers Alcool-90 (190 proof alcohol). Stored in, Alcool-90 "is an experimental extension of ML with run-time overloading and a type-based notion of modules, functors and inheritance".

Lazy ML and Haskell

Lazy ML (LML) is a lazy, completely functional variant of ML. That is, LML puts off evaluation of all expressions until the last possible moment, allowing programmers a great deal of flexibility. LML is archived in The LML distribution also contains a compiler for Haskell, a further variation.

Further Reading

I find "Principles of Functional Programming" (see above) to be a clear exposition of the rationale and methods of functional programming. I would strongly recommend it or some similar treatment as a prelude to any of the following works.

The "ML Primer" (see above) has a wealth of clear explanations, but it is a bit short on motivation. If reader already understands ML's philosophy, s/he will do just fine. Otherwise, s/he may wonder what's going on.

Making matters worse, the Primer contains a large number of forward references. Although this can be resolved by reading the book in several passes, a more organized approach would have been more useful.

For a full mathematical description of ML, go to "Definition of Standard ML" (Milner, et al., MIT, 1990). The companion volume, "Commentary on Standard ML" (Milner, et al., MIT, 1991) gives a detailed explanation of ML's semantic theory.

I haven't seen "ML for the Working Programmer" (Paulson, Cambridge, 1991), so I can't say much about it. On the other hand, I am quite impressed by the fact that the author has provided a wealth of on-line code for his readers. The answers to the exercises in the first five chapters are stored as answers1-5.txt.Z in The source code for all programs in the book are stored as working.tar.Z in the same archive.