# OCaml

OCaml is an industrial strength programming language supporting functional, imperative and object-oriented styles. It is open source and self-hosted, installable on Docker Hub.

Canonical page: https://ourlocalhost.com/app/5805/ocaml

## Description

OCaml is an industrial strength programming language supporting functional, imperative and object-oriented styles.

## Platform availability

Available on 0 of 10 platforms.

## Health score

75/100 (Good), based on 3 of 4 factors.
- Maintained: 100 (last commit 3 days ago)
- Popular: 76 (6,645 GitHub stars)
- Easy to install: 25 (0 install platforms, install notes, Docker image)

## Links

- GitHub: https://github.com/ocaml/ocaml
- Docker Hub: https://hub.docker.com/r/ocaml/ocaml
- Official website: https://ocaml.org
- Documentation: https://ocaml.org/api

## Common questions

### Should I evaluate OCaml 5.x for an existing OCaml codebase?

OCaml 5.x includes a runtime rewrite for shared-memory parallelism and native effect-handler concurrency, while 4.14 remains supported. The README encourages maintainers to evaluate 5.x and report performance degradations on the issue tracker.

### How do I install the OCaml language server?

Use opam install ocaml-lsp-server to install it into the active OPAM switch, or run dune tools install ocamllsp inside a Dune-managed project. You can also clone the repository and build it from source.

### How do I search the OCaml API documentation?

The API search accepts bare values, module-qualified values, and type signatures. You can separate keywords with spaces, and quotes force an exact phrase.

### How do examples handle class variables in OCaml?

A Reddit commenter says examples use global variables packaged with the class in its own module. This keeps the global namespace cleaner.

## Alternatives

- C (programming language)
- C++
- Erlang: Concurrent, functional programming language enabling fault-tolerant, distributed, and scalable real-time systems, with hot swapping, garbag…
- F# (programming language): Functional-first, open-source language for .NET, supporting static typing, succinct syntax, advanced pattern matching, object-oriented and…
- Rust

---
Source: Our Local Host (https://ourlocalhost.com/app/5805/ocaml), the self-hosted and open-source app directory.
