SML & SML/NJ

Standard ML (SML) is a safe, modular, strict, functional, polymorphic programming language with compile-time type checking and type inference, garbage collection, exception handling, immutable data types and mutable references, abstract data types, and parametric modules. It has efficient implementations and a formal definition with a proof of soundness. SML/NJ is the implementation of SML we will be using in this course. Other well-known implementations include MLton and Poly/ML. The parts of the course concerned with programming in SML will, to a large extent, follow Harper's Programming in Standard ML (available in a version intended for online reading), supplemented by the lecture notes. For the more theoretical parts, you may also find Harper's Practical Foundations for Programming Languages (available online) useful.

If you're printing chapters from Programming in Standard ML and would like to save paper or printing costs by printing "2-up", download this version enlarged to 125% and select "2-up"/"Multiple pages per sheet"/etc. when printing. That should give you a copy with small, but still legible text, without enormous margins.

To get you started with SML and SML/NJ, consult the FAQ page. The following external resources might also be useful.

Functional programming in practice

If you are interested in learning more about how and where functional programming is used in industry, check out the following.

Comparisons

For an interesting recent comparison between programming languages, see the ray tracer language comparison. For some older articles on why functional programming matters, see the following.

Emacs

Emacs (available in two implementations, GNU Emacs and XEmacs) is a widely-used text editor. It is well-suited for SML development through the sml-mode package, which makes it easy to interact with an SML/NJ session. See the FAQ page for more information on obtaining, installing, and using both emacs and sml-mode.