4 ms·
Thanks, this was helpful as someone who's interested in this set of tools but hasn't been following closely enough to understand how they all fit together (e.g.
by _delirium 9y ago
Thanks, this was helpful as someone who's interested in this set of tools but hasn't been following closely enough to understand how they all fit together (e.g. why there's both js_of_ocaml and Bucklescript, and how ReasonML fits into this).
For my own needs, it still seems unclear which way I should go though. The attractive thing about the tools to me is that you can write code that compiles to native and web, in a more or less MLish way (which I like). But it seems like either route works for that. I could just write OCaml, using the regular native toolchain for native compilation, and either Bucklescript or js_of_ocaml to compile to web. Or, I could use the ReasonML toolchain instead. If I'm not primarily a JS dev, is there a reason to pick one or the other? The syntax differences so far don't jump out at me as exciting enough to be decisive. I guess I could try a small side project in each and see how it goes.
- m0meni 9y agoI think why you'd pick Reason over OCaml boils down to whether you prefer the Reason syntax more, and perhaps that it'll have more mindshare than OCaml in the future. I think the question is similar to why you'd pick Elixir over Erlang.
- amirmc 9y agoIt's not just about languages. Try out both communities and see which you might prefer to interact with in the medium/longer term. As you suggest, small side projects with each would be a good way to go.
- thangngoc89 9y agoHey author here, This boiled down to where you like C-like syntax or ML-like syntax. You could use refmt to convert between OCaml and Reason syntax automatically. Once you know the language, you can use both of them without any problems
- bsansouci 9y agoOne thing I’ll add on top of the other comments is that the Reason community has been trying hard to build tools and libraries for people who are building products. Doing that for two reasons: 1) Most of Reason contributors are actually working on a product, and contribute to Reason on the side (20% or personal time kinda thing) 2) Product driven dev allows us to build simpler things that solve real problems that people have :) This means that the Reason tools are less powerful but also simpler. In particular I’m thinking of bsb (https://bucklescript.github.io/docs/en/build-overview.html#docsNav https://bucklescript.github.io/docs/en/build-overview.html#d...) and bsb-native (https://github.com/bsansouci/bsb-native https://github.com/bsansouci/bsb-native), the latter’s a simple fork of the former that adds support for building to native. Bsb is simple and thanks to that very fast and easy to setup.
- yawaramin 9y agoIf you want to potentially develop for native, make sure to install the OPAM toolchain, it will give you access to the existing OCaml native ecosystem. Reason is also easy to install from OPAM https://reasonml.github.io/docs/en/global-installation.html#alternative-through-opam https://reasonml.github.io/docs/en/global-installation.html#... Remember that BuckleScript is a separate thing which you can get any time with just `npm install --global bs-platform`