News for hackers. Stuff that matters.
Re:Exploring ReasonML and functional programming by cies on Thursday February 08, 2018 @09:33PM (#16337463)
> Someone will have to explain why I might pick ReasonML over Elm

* bigger team (Elm the lang itself is almost a one man show)

* openly developed (Elm's dev't is in private, for now at least)

* interop with JS is easier

* great interop with React

* has a company behind it (FB), who uses it in production (messenger.com)

* already works on the server (with Node and with experimental native compilation (bsb-native))

* server-side native compilation is within the vision the core team (not so much with Elm)

* a lib exists for The Elm Architecture (TEA), see the bucklescript-tea package

* JS'ish (C'ish) syntax (Elm has an ML like syntax) -- this may or may not be your thing, I think it makes FP more accessible

* not pure functional (like Elm), thus allows mutation and side effects -- this may or may not be your thing, it makes interop with JS easier but comes with less strong safety guarantees

> Elm's community seems very focused on making front-end development as intuitive and hassle-free as possible.

Elm's community is great, but probably smaller than ReasonML's community in the long run, as I expect FB to use it a lot internally and thus has a great patron. Also, most big tech has their own language: Apple/Swift(ObjC), Google/Go(Dart), Mozilla/Rust, FB/Reason. I think it is the only language that potentially facilitate both FE, mobile and server-side dev't. It's a very interesting pick at this point.

> ReasonML seems like Facebook just wanted to leverage a pre-existing community but couldn't bring themselves to adopt the syntax so rewrote it in-house.

Yes. And to me this does not sound bad. They took OCaml, and BuckleScript, then added a new syntax, some tooling and libraries. They positioned a language that ticks a lot of boxes in a very short time, and since it has free interop with OCaml it comes with quite a strong lib ecosys for native (server-side) dev't.

There are no comments on this comment yet.