What is OCaml written in?
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
Evidence Sources
- https://en.wikipedia.org/wiki/OCaml
- https://github.com/ocaml/ocaml
- https://github.com/iohub/rustboot
- https://reasonml.github.io/
- https://fsharp.org/history/hopl-final/hopl-fsharp.pdf
- https://en.wikipedia.org/wiki/ReScript
- https://en.wikipedia.org/wiki/Coq
- https://en.wikipedia.org/wiki/Haxe
- OCaml on Wikidata (Q212587)