What is the status and future of reasonml?

I can’t understand the place of reasonml and its surrounding ecosystem in the bigger ocaml ecosystem, especially after rescript became it’s own thing.
Can anyone explain reasonml, esy, pesy and their purpose and why would someone choose them instead of plain ocaml syntax, opam and dune?


I think Reason should be treated as a dead project until proven otherwise. I.e. there might be something coming from Jordan Walke but there’s practically no activity currently.

Most people who came for bucklescript/compilation to JS moved to Rescript. At my company we converted all of the compile-to-js code to Rescript and the rest to OCaml.

It’s pretty sad and I do hope there’s a rebirth with JSOO focused workflows. Even if it’s just for the JSX syntax. It’s very useful for writing React applications.

1 Like

Out of curiosity, do you know what Onivim is going to do? Are they going to stick with it? I imagine it would be difficult to give up because of the JSX…

For what it’s worth, it looks like Revery (the UI framework Onivim uses) plans to stick with Reason, at least as of December 2020: https://github.com/revery-ui/revery/issues/1028

And there’s a thread in the ReasonML issues regarding the projects future - it looks like it plans to continue on just as it was before the ReScript split: https://github.com/reasonml/reason/issues/2634

Of course, it’s impossible to say if it’ll continue on indefinitely, but if you prefer the syntax, I would say go ahead and use it unless you want to be particularly cautious. I’m fairly sure there’s a Reason → OCaml syntax transpiler around somewhere, too.

If you haven’t already, check out melange: a fork of BuckleScript that aims for close integration with OCaml. Hopefully some day it will fit into the OCaml ecosystem as nicely as js_of_ocaml (easy compilation with dune, latest OCaml version etc.) while having the same clean output and smoother interop with JS as BuckleScript.

The Reason syntax transformer tool, refmt, can go both ways i.e. parse Reason and print OCaml syntax. Couple of rather big caveats though, it adds a bunch of Reason-internal attributes to the OCaml output, and loses all non-doc comments.

This was the original use that motivated writing ocamlformat, see e.g. this commit. As far as I know, it hasn’t been used in this way for quite some time though.

1 Like

[full disclosure: I’m an OCaml bigot and find the syntax to be lovely and a pleasure to read & write; nevertheless, I appreciate that others might not agree]

I thought Facebook was pushing Reason? Is that no longer the case? Just curious: not like I really care either way, except and only b/c I recognize the value of a JS-like frontend syntax for OCaml. After all, a gynormous part of Java’s initial success was its superficial similarity to C++.

1 Like

Facebook never ‘pushed’ Reason in the same way it did, e.g., React. Comparatively speaking, Reason is almost a skunkworks project. Now that the original Reason creators/contributors have moved on to other things, Reason is basically in suspended animation.

esy is still alive and we’re using it actively on my daily job also sponsoring people to work on it. esy@0.6.11 in my opinion gives by far the best experience when developing OCaml on Windows. And to me a much more reliable experience on Linux and macOS.

Reason as a project is dead, it can come back alive later but right now it’s dead, I’m mostly using it because I’m adapted to C like syntax. And refmt is still way better than ocamlformat to me, ocamlformat has options and bad defaults, which for me is the opposite of what I would want in a formatter.

pesy I have no idea, never used it that much.

Melange at the end of the day it’s an OCaml compiler, and the idea is that it should work as any other OCaml tool, so being Reason, OCaml, opam, esy or anything else, it should still behave as expected.


O.I.C. That’s a pity.

esy@0.6.11 in my opinion gives by far the best experience when developing OCaml on Windows.

There is another, more “native” approach: [ANN] Windows-friendly OCaml 4.12 distribution - Diskuv OCaml 0.1.0

Yeah, I’ve been looking on it, I wouldn’t call it more native, it’s using msvc but that doesn’t make it more native, just more annoying to handle also the integration between esy and the OCaml Platform extension on VSCode makes it work really well now that admin is not needed anymore. There is some problems on merlin but I think that will affect any tooling on Windows.

Mostly esy on Windows provides you with an working Unix environment that still generates WinPE binaries.

I believe Facebook handed the IP of Reason to Jordan when he left (this is why the github project moved from facebook/reason to reasonml/reason). He said something along those lines in the reasonml discord.

Until he has time to work on it again, it’s completely idle (aside from occasional maintenance to support new OCaml versions).