ReasonML is a alternate syntax for OCaml invented at Facebook to be more familiar to programmers coming from JavaScript . OCaml is a over 20 year old general purpose language that is both expressive and safe. It belongs to the ML family of languages and it means that it has a strong type system that will guide you to write less bugs. Other languages in the ML family that you might have heard about are F# and Haskell.

Because ReasonML is just a alternate syntax for OCaml everything that is possible with one can be done with the other. ReasonML can be compiled to native binaries and bytecode with the standard compiler and there are two ways to compile to JavaScript, “JavaScript of OCaml (JSOO)” and BuckleScript. The natively compiled binaries are often really fast especially when compared to node based JavaScript that powers both web servers and desktop apps. esy is a package manager that introduces a npm-like workflow for native development, right now it’s main goal is to be the best package manager for OCaml and Reason but can in theory be used with any language.

At Xenit we’re using ReasonML together with React, via ReasonReact, to build the frontend of our Identity Provider. It brings us ease of refactoring and a higher degree of security when writing our code. We’re building some other internal tools with ReasonReact and we’re also exploring developing native applications with ReasonML. This includes both UI applications with a framework, revery, that aims to replace electron as a simple way to create desktop applications and micro service backends.

This is just a introduction and there will be more interesting posts about the Reason universe in the future.