Reason (programming language)

Syntax extension and toolchain for OCaml

This is the current revision of this page, as edited by 96.230.237.114 (talk) at 01:18, 24 May 2024 (ReScript no longer works with Reason syntax, added notes about bucklescript fork to Melange.). The present address (URL) is a permanent link to this version.

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Reason, also known as ReasonML, is a general-purpose, high-level, multi-paradigm, functional and object-oriented programming language and syntax extension and toolchain for OCaml created by Jordan Walke, who also created the React framework, at Facebook.[2][3] Reason uses many syntax elements from JavaScript, compiles to native code using OCaml's compiler toolchain, and can compile to JavaScript using the ReScript compiler.[4]

Reason
ParadigmsMulti-paradigm: functional, imperative, modular, object-oriented
FamilyML: Caml: OCaml
Designed byJordan Walke
First appearedMay 16, 2016; 9 years ago (2016-05-16)[1]
LicenseMIT
Filename extensions.re, .rei
Influenced by
OCaml, JavaScript

The Reason community officially provides ReasonReact as a solution for React-based web applications.[5]

BuckleScript and ReScript

Reason was originally compiled to JavaScript using the BuckleScript compiler,[6] which was created at Bloomberg L.P.

In 2020, the BuckleScript and Reason toolchain was rebranded to ReScript, essentially creating a separate language that had different syntax from Reason and only compiled to JavaScript.[7]

BuckleScript was forked to Melange[8] to continue to support compiling OCaml to JavaScript.

See also

Lua error in mw.title.lua at line 346: bad argument #2 to 'title.new' (unrecognized namespace name 'Portal').

  • Elm – A functional language that uses an abstraction called ports to communicate with JavaScript
  • PureScript – A strongly-typed, purely-functional programming language that compiles to JavaScript

References

  1. ^ "Simple, fast & type safe code that leverages the JavaScript & OCaml ecosystems: facebook/reason". GitHub. Facebook. 2019-03-23. Retrieved 2019-03-23.
  2. ^ "What is ReasonML?". 2ality. Retrieved 2019-03-23.
  3. ^ Rauschmayer, Axel (2018). Exploring ReasonML and functional programming. ReasonML Hub. Retrieved 2024-05-14.
  4. ^ "Overview: ReScript Documentation". rescript-lang.org. Retrieved 2020-08-10.
  5. ^ "ReasonReact". GitHub.
  6. ^ "BuckleScript". bloomberg. Retrieved 2022-09-11.
  7. ^ "BuckleScript & Reason Rebranding". rescript-lang. Retrieved 2022-09-11.
  8. ^ "ANN: Melange 1.0 – compile OCaml / ReasonML to JavaScript". OCaml. 2023-06-02. Retrieved 2024-05-24.

External links