Paradigm | multi-paradigm: imperative, functional |
---|---|
Designed by | Robin Milner & others at the University of Edinburgh |
First appeared | 1973 |
Typing discipline | static, strong, inferred, safe |
Dialects | |
Standard ML, Caml | |
Influenced by | |
ISWIM | |
Influenced | |
Clojure, Coq, Cyclone, C++, Elm, F#, Haskell, Idris, Miranda, Nemerle, OCaml, Opa, Erlang, Rust, Scala |
ML is a general-purpose functional programming language developed by Robin Milner and others in the early 1970s at the University of Edinburgh, whose syntax is inspired by ISWIM. It has roots in the Lisp language, and has been characterized as "LISP with types". Historically, ML stands for MetaLanguage: it was conceived to develop proof tactics in the LCF theorem prover (whose language, pplambda, a combination of the first-order predicate calculus and the simply-typed polymorphic lambda calculus, had ML as its metalanguage). It is known for its use of the Hindley–Milner type system, whose type inference algorithm can automatically assign the types of most expressions without requiring explicit type annotations. Additionally, the use of this algorithm ensures type safety – there is a formal proof that a well-typed ML program does not cause runtime type errors.
Features of ML include a call-by-value evaluation strategy, first-class functions, automatic memory management through garbage collection, parametric polymorphism, static typing, type inference, algebraic data types, pattern matching, and exception handling. ML uses static scoping rules.