Programming language · 1996

OCaml

Extension of the Caml programming language.

Official site ›
OCaml logo
C, OCaml, AssemblyWritten in
1996First released
INRIADeveloper
staticTyping
Q Public License and GNU Lesser General Public License, version 2.1License
Built fromInfluenced OCaml COCamlAssemblyMLStandard MLReasonMLReScriptF#
RuntimeCompilerInfluence

What is OCaml written in?

The OCaml compiler is written in OCaml (well-documented). Its runtime is implemented in C and Assembly (documented). OCaml is self-hosting.

What OCaml is used for

OCaml is a fast, statically typed functional language used in compilers, formal verification, and finance, where its expressive type system catches errors early.

Notable software: the first Rust compiler, Jane Street's trading systems, the Coq proof assistant, and the Flow type checker for JavaScript.

Quick Facts

Designed by
Xavier Leroy and Damien Doligez
Developer
Institut National de Recherche en Informatique et en Automatique
First released
1996
Typing
static
License
Q Public License and GNU Lesser General Public License, version 2.1
Filename extension
.ml, .mli
Website
ocaml.org

About OCaml

OCaml is an extension of the Caml programming language. It is a statically typed and garbage-collected language that compiles ahead of time to native machine code. It supports functional, imperative, and object-oriented programming.

OCaml first appeared in 1996 and was designed by Xavier Leroy and Damien Doligez at INRIA. OCaml keeps a steady, moderate following today.

How OCaml is implemented

In the Language Lineage dataset, OCaml is self-hosting, so its own compiler is written in OCaml itself and its runtime is implemented in C and Assembly. Reaching self-hosting, where a language is mature enough to compile itself, is a milestone that proves the language can handle a large, real-world program.

OCaml in the language family tree

OCaml drew on ideas from ML and Standard ML and went on to influence ReasonML, F#, and ReScript.

Sources: Wikipedia · Wikidata · Official site

Frequently Asked Questions

What language is OCaml written in?
OCaml is primarily implemented in C and OCaml and Assembly. See the implementation section above for details and source references.
What languages influenced OCaml?
OCaml was influenced by ML, Standard ML among others. See the influence section above for the full list.
Which languages did OCaml influence?
OCaml influenced ReasonML, F#, ReScript among others.
Is OCaml self-hosting?
Yes, OCaml is self-hosting, its compiler can compile itself.
When was OCaml first released?
OCaml was first released in 1996. It was designed by Xavier Leroy and Damien Doligez.

Evidence Sources

Discover More

Embed this graph

Paste this iframe into any HTML page to show the OCaml relationship graph.

<iframe src="https://www.languagelineage.org/embed?lang=ocaml" width="100%" height="500" loading="lazy" style="border:0" title="OCaml relationship graph"></iframe>

Please attribute the visualization to Language Lineage and link to the OCaml source record.

Explore OCaml in Graph →