ReasonML vs X (different compiled to Javascript languages)


Alright, let’s start a thread comparing ReasonML vs X:

  1. Read What and why ReasonML?
  2. vs Scala.js
  3. vs TypeScript
  1. vs F# and Fable

  1. vs Elm

P/s @chenglou not sure why I can’t edit the above post any more.


Poor 2ality’s name got mangled :wink:


Most of my experience with other languages predates Reason. I’d love to hear from others. In my experience:

  • TypeScript is close to the metal but often challenging to model functional patterns and lacks pattern matching.
  • PureScript had clean FFI but more DIY than BuckleScript and even React libraries were composed at confusing levels of abstraction.
  • Elm was super easy to dive into but discouraged any FFI, closed to differing levels of abstraction, and lacked naming consistency.
  • Reason is rad.
    • Some of the syntactic quirks of OCaml like nesting matches just work better with braces like JavaScript.
    • Unlike the aforementioned options OCaml has already been maturing for 20 years.
    • It enables Haskell-like levels of abstraction yet hosts a community that wields that power conservatively.
    • It includes imperative constructs yet makes functional style the default.
    • The compiler is lightning fast.
  • Scala.js I haven’t used but Scala 2.8 was my first exposure to FP. It’s very OCaml-inspired with analogous abstractions plus “implicits”. It’s syntax is motivated to be Java-like similar to Reason’s. Unlike OCaml/Reason it feels OOP by default rather than functional first.Their FFI and performance profile look comparable to BuckleScript’s.


Ouch. I can’t edit the post right now. I always thought it’s “to ability” .