Standard ML was proposed in 1983, designed from '84-'88, and defined in Definition of Standard ML (Milner, Tofte, Harper, MIT Press, 1990).Standard ML '97 is a modest revision (and simplification) of the language, defined in The Definition of Standard ML (Revised) (Milner, Tofte, Harper, MacQueen, MIT Press, 1997).
The name of the revised language remains "Standard ML", but we also refer to it as "Standard ML '97" or "SML '97" to distinguish it from the 1990 version, which can be referred to as "SML '90".
At the same time, the new SML Basis Library is added to the specification of the language. The new basis library is intended to support a wide range of systems and applications programming: it specifies a broad collection of predefined modules that provide basic types, input/output facilities, and interfaces for interacting with the host operating system in a portable way.
The principal language changes in SML '97 are:
- The elimination of imperative type variables. The role of imperative type variables in constraining polymorphism in the presence of effects is now played by the value restriction, which allows the type of a val binding to be generalized only when the right hand side is an expression in a restricted form called a value expression. A value expression is either a constant, a variable, a function expression (i.e. a lambda expression) or is built from these elements using products and constructions.
- The elimination of structure sharing. Type sharing is still available, and the structure sharing notation remains, but is interpreted in a weaker sense, as an indirect way of expressing type sharing. The role of type sharing is restricted somewhat so as not to conflict with type definitions.
- The addition of type definitions in signatures. There is also a new where type notation that allows one to modify an existing signature by adding definitions for its type components. New forms of datatype specifications and definitions allow a datatype to be defined to be the same as an existing datatype.
Documentation
A SML '97 Conversion Guide covers the issues of converting programs from SML/NJ 0.93 to SML '97 (SML/NJ 110). A useful conversion aid is the Top Level Environment Comparison, which summarizes the differences between the top level environments of SML/NJ 0.93 (which is assumed by some older textbooks) and the new SML '97 (SML/NJ 110) top level.
Text Books
The following new editions of ML programming textbooks describe SML '97.
- Paulson's ML for the Working Programmer (2nd edition)
- Ullman's Elements of ML Programming (ML97 Edition)
Implementations
- Standard ML of New Jersey
- The new SML/NJ version 110 implements SML '97.
- Harlequin ML Works
- A commercial implementation featuring a graphical development environment.
- Moscow ML
- A lightweight implementation that does not support the SML module system