3 ms·
It's great to see more comparisons and articles about ReasonML and this one is really concise! But I do wish articles were more clear about the relationship bet
by philplckthun 7y ago
It's great to see more comparisons and articles about ReasonML and this one is really concise! But I do wish articles were more clear about the relationship between ReasonML, OCaml, and Bucklescript.
> It is also interesting to look at what javascript was generated by ReasonML
This is where BuckleScript should probably be mentioned first. TypeScript is both the name for the language and the tsc compiler, since it's a single project. But with BuckleScript that's not the case.
> BuckleScript is the tool that transpiles ReasonML to JavaScript.
There's also the older js_of_ocaml (JSoO) project, and there's more great Reason/OCaml tooling for native, like esy and dune! It's really exciting, but these small details are rather interesting and it's important to highlight them to avoid confusing beginners.
- k__ 7y agoAs far as I understood is esy uses dune and dune uses BuckleScript, so they aren't alternatives.
- brmgb 7y agoSadly, BuckleScript tries to do everything. It ships with a not so-great build system, a good compiler to javascript, a standard library replacement and it invites you to use npm for package management. Dune is the build system which has become the standard in the Ocaml community. It can use the native compiler or js-of-ocaml to produce javascript. It doesn't support BuckleScript however. Esy is a tool which allows you to manage your project dependencies. It can pick package from both opam and npm and uses Dune as a build system. It's actually very good. As Facebook mostly pushes ReasonML towards Javascript developers, they mostly advertise BuckleScript. From what I have seen, the Ocaml community mostly does not care about Reason. They had no issue in modifying tools to support it and noone is going out of its way to hinder it but there is no particuliar enthusiasm towards it.
- k__ 7y agoUnderstandable. For JS it's a step forward, for OCaml it seems to be a step back.
- yawaramin 7y ago> there is no particuliar enthusiasm towards it. There's no particular enthusiasm towards quite a lot of things in the OCaml community :-) there are even some holdouts who don't like or use dune/opam. I wouldn't take that as a point against ReasonML/BuckleScript, which is bringing devs en masse to OCaml who would have never looked at it before.
- pkilgore 7y agoThis is a very good point and I'm glad my other comment isn't the only one bringing it up. Frankly, of the time I spend reading documentation for my (Web) project right now it breaks down into 5% reason-urql (thanks, BTW, can't wait for 1.0), 10% reason-react, 15% ReasonML, 70% bucklescript. Even the ReasonML docs that I am reading are pretty heavy on the bucklescript.