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.
- SML/NJ User's Guide, including information on downloading and installing SML/NJ.
- The SML Basis Library, including information on useful common functions included with most implementations of SML.
- Tips for Computer Scientists on Standard ML, by Mads Tofte.
- About Coding Style, an SML style guide written by students at CMU.
- SML/NJ Literature, including further tutorials.
- L. Paulson: ML for the Working Programmer, 2nd edition. Cambridge University Press, 1996. (Available on Amazon)
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.
- Haskell in Industry
- OCaml success stories
- Commercial users of Erlang
- Commercial Users of Functional Programming conference
- F#: Combining ML and .NET. Developed by Microsoft.
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.
- John Hughes: Why functional programming matters.
- Philip Wadler: Why no one uses functional languages.
- Paul Hudak and Mark Jones: Haskell vs. Ada vs. C++ vs. Awk vs. ...: an experiment in software prototyping productivity.
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.