Welcome to the Dictionary of Programming Languages, a compendium
of computer coding methods assembled to provide information and
aid your appreciation for computer science history.
Browse the dictionary by clicking on a section:
Get a full dump of the dictionary:
List of Names
- Language type:
F - Functional or lambda-based
ML is the name for a family of functional
programming languages: ML, SML, SML/NJ,
CAML, EML, and others. The features
and usage of the different versions vary
somewhat; this description is based on
documentation for Standard ML.
ML language systems are usually interpreters.
ML is a 'pure' functional language, in the
sense that there is not assignment to
storage permitted. Instead, in ML the
programmer declares functions and
references to values; ML is a declarative
rather than a procedural language. The
lack of VonNeumann semantics makes functional
languages like ML challenging for the
programmer, but functional programs
are much more amenable
to formal analysis and proofs of correctness.
ML supports many of the advanced
capabilities expected of a good functional
language: recursion, strong typing with type
a good variety of built-in data types,
facilities to construct aggregate and
late binding, function
composition, higher-order functions,
and exception handling.
Pure functional languages permit no
side-effects of functional evaluation.
These languages are usually of limited
ML provides file and network I/O to
support writing real programs;
writing data constitutes a side
effect of evaluating an output function.
supports references to mutable storage,
thus allowing the programmer some of the
convenience of a VonNeumann model while
preserving functional operation?
All SML systems share a common library
of built-in functions and modules called
the SML Basis Library. The basis library
provides various data manipulation, I/O,
string handling, and operating system
ML's sophisticated type system gives the
programmer the ability to
define simple functions that automatically
get applied to the right kind of data. It
also supports very fine-grained polymorphism.
Many other functional languages designed
after ML also support a pattern-matching
approach to function application.
The name ML originally stood for
in several ways during the mid to late-1980s;
a common dialect and base set of features
were standardized as SML in 1990. The
standard was revised in 1997, language systems
that comply with the new standard are
called SML'97 implementations.
Information on ML is easily available
on the Internet. Several free
implementations of ML exist for most
platforms, some of the most popular are
SML/NJ, CAML, and Moscow-ML. At least
one commercial implementation, from
Harlequin Group is
Standard ML, Milner and Tofte, 1990.
- See Also:
SML is a very rich and usable functional
language. It provides a very practical
set of aggregate data types (tuples,
lists, arrays), and good
facilities for defining new types.
Many academic functional languages do
not support graphics or GUIs, some
versions of ML can present visual
interfaces and output using the X Window
System or MS-Windows.
The French CAML system support
object-oriented programming and a Tk-based
There have also been versions of ML
that support lazy evaluation and
- Sample code:
ML definitions to sort a list and compute
the mean, adapted from Andrew Cumming's GIML.
fun sort nil = nil : int list
| sort(h::t) = let
fun insert(i,nil) = [i]
| insert(i,h::t) = if i>h then i::h::t else
in insert(h, sort t) end;
fun mean l = let
fun sl(nil ,sum,len) = sum div len
| sl(h::t,sum,len) = sl(t,sum+h,len+h)
in sl(l,0,0) end;
mean(sort [2,3,5,7,11,13] @ [6,14,28] )
Descriptions in this dictionary are ©1997-99 Neal Ziring. Some
examples copyright of their respective authors. Some
technologies and languages are trademarked. Permission to
copy descriptions is granted as long as authorship credit is preserved.
Comments on this dictionary, corrections and suggestions, are all welcome.
Please use email, the address is email@example.com
[Ziring MicroWeb Home]
Dictionary and script maintained by Neal Ziring, last major modifications 3/18/98. Most recent
additions to dictionary and master list, 1/00.