Ml Programming Language Article Index for
Ml
Website Links For
Programming
 

Information About

Ml Programming Language




  paradigm , Functional
  year 1973
  designer Robin Milner & others at the University Of Edinburgh
  typing Static , Strong , Inferred
  dialects Standard ML , OCaml , F#
  influenced By ISWIM
  influenced Miranda , Haskell , Cyclone , Nemerle , C++


ML is a general-purpose Functional Programming Language developed by Robin Milner and others in the late 1970s at the University Of Edinburgh , whose syntax is inspired by ISWIM . Historically, ML stands for ''metalanguage'' as it was conceived to develop proof tactics in the LCF Theorem Prover (the language of which ML was the metalanguage is ''pplambda'', a combination of the First-order Predicate Calculus and the simply-typed Polymorphic Lambda-calculus ). It is known for its use of the Hindley-Milner Type Inference algorithm, which can infer the types of most values without requiring the extensive annotation often criticised in languages such as Java .


OVERVIEW

ML is often referred to as an impure functional language, because it permits Side-effects , and therefore Imperative Programming , unlike Purely Functional programming languages such as Haskell .

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 .

Unlike Haskell, ML uses Eager Evaluation , which means that all subexpressions are always evaluated. One result of this is that you cannot use infinite lists per se. However, lazy evaluation and hence infinite lists can be simulated, through use of anonymous functions.

Today there are several languages in the ML family; the two major dialects are Standard ML and Caml , but others exist, including F# - an open research project that targets the Microsoft .NET platform. Ideas from ML have influenced numerous other languages, such as Haskell , Cyclone , and Nemerle .

ML's strengths are mostly applied in language design and manipulation (compilers, analyzers, theorem provers), but it is a general-purpose language also used in bioinformatics, financial systems, and applications including a genealogical database, a peer-to-peer client/server program, etc.


EXAMPLES OF ML


Anatomy of an ML function

The "Hello World" of functional languages is the Factorial function. Expressed as pure ML:

fun fac (0 : int) : int = 1
  Fac N n fac(n-1)
  "http://wwwinformationdelightinfo/information/entry/LCF_theorem_prover" class="copylinks">LCF Theorem Prover , ISWIM
  "http://wwwinformationdelightinfo/information/entry/Standard_ML" class="copylinks">Standard ML , OCaml , F# , Haskell , Cyclone , Nemerle