ML : ever heard about it?

Do not worry! This is not another paper talking about the wonders of Machine-Learning (wrote ML too).

Here we will be talking about a programming language born in 1973 that is not that trendy nowadays — you will not find it at the top 50 at TIOBE index — but it has had an enormous influence on tons of other programming languages such as Clojure, Erlang or Haskell.

ML stands for Metalanguage, which means something like “the language of the language” as it was conceived to develop proof tactics in the LCF, an interactive theorem prover created at the universities of Edinburgh and Stanford.

ML is a general-purpose impure functional language, which means that it treats computation as the evaluation of mathematical functions — thus should avoid changing-state and mutation of data, like in maths the result of a function f(x) will produce the same result each time the same x is evaluated — but it does allow side-effects such as the modification of input parameters of the function: x variable could be modified after calling f(x) function !

It includes build-in specs like call-by-value evaluation strategy similar to C that evaluates the argument expression of a function and bounds the resulting value to the corresponding variable on the function , parametric polymorphism that allows functions to handle values identically without depending on their type, type inference that automatically deduces the data type of a function, pattern matching that checks a sequence of tokens looking for an exact sequence, and an automatic memory garbage collector in order to be as memory-efficient as possible.

Type inference exemple. We say nowhere that a and b are numbers !

All these features make ML a good option for developing compilers, analyzers or even theorem provers such as LCF one. However, it remains a general purpose language and it is used here and there in bioinformatics, financial systems and even in peer-to-peer client/server projects.

As the rest of languages it has had to adapt to new times and ML has evolved into SML (standard ML) and has influenced some other languages like Caml / OCaml or Rust.

So… do you feel like it? Give it a try ;)

--

--