Additionally, the ReasonML team aims to improve the OCaml ecosystem:
- Better tooling (testing, documentation, editor support, etc.).
- Better standard library (there is a fair amount of competition in this space in OCaml, without a clear winner). Here, the goal is also to use camel-cased names (
createResource). OCaml uses snake-casing for lowercase names (
create_resource) and camel-casing for uppercase names (
Benefits of OCaml:
- It is an established language (created in 1996) that has proven itself in many projects. Facebook itself is using it in several projects (e.g. Flow).
- Its core is a functional programming language (with a full-featured type system). But it also supports object-orientation and mutable state.
Full rebuild of the Reason part of the codebase is ~2s (a few hundreds of files), incremental build (the norm) is <100ms on average. The BuckleScript author estimates that the build system should scale to a few hundred thousands files in the current condition.
OCaml’s pragmatism means that you don’t get some of the more fancy functional features (that, e.g., Haskell has), but it also leads to fast compilation, efficient code and decent error messages.