What is OCaml written in?

Year 1996 Paradigm functional, imperative, object-oriented Typing static Self-hosting yes
The OCaml compiler is written in OCaml (well-documented). Its runtime is implemented in C and Assembly (documented). OCaml is self-hosting.

Relationship Graph

All directly connected languages. Click any node to navigate to its page.

Compiler Implementation

LanguageConfidenceNotesSource
OCaml 98% OCaml compiler is self-hosting Source

Runtime Implementation

LanguageConfidenceNotesSource
C 95% OCaml runtime/GC written in C Source
Assembly 85% OCaml runtime has assembly components Source

Influenced By

Languages OCaml Influenced

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# among others.
Is OCaml self-hosting?
Yes, OCaml is self-hosting — its compiler can compile itself.

Evidence Sources

Related Languages

Explore OCaml in Graph →