Jump to content

Reason (programming language)

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 2600:1700:3ec0:f950:9c1d:bd07:39f0:a3f8 (talk) at 02:44, 12 September 2022 (Add references to ReScript and BuckleScript rebranding.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Reason
Designed byJordan Walke
First appearedMay 16, 2016; 9 years ago (2016-05-16)[1]
Stable release
3.8.1 / June 28, 2022
LicenseMIT License
Filename extensions.re, .rei
Websitereasonml.github.io

Reason, also known as ReasonML, is a syntax extension and toolchain for OCaml created by Jordan Walke, who also created React, at Facebook.[2] Reason offers a syntax familiar to JavaScript programmers, and compiles to native code using OCaml's compiler toolchain. Reason code may also be compiled to JavaScript using the ReScript compiler.[3]

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

BuckleScript and ReScript

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

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

The ReScript compiler continues to support Reason syntax, and the two languages share that part of the toolchain.

See also

  • 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
  • ReScript: a functional programming language that compiles to JavaScript and shares part of the Reason/OCaml toolchain

References

  1. ^ Simple, fast & type safe code that leverages the JavaScript & OCaml ecosystems: facebook/reason, Facebook, 2019-03-23, retrieved 2019-03-23
  2. ^ "What is ReasonML?". 2ality. Retrieved 2019-03-23.
  3. ^ "Overview | ReScript Documentation". rescript-lang.org. Retrieved 2020-08-10.
  4. ^ "ReasonReact". GitHub.
  5. ^ Wilson, Ian (2019-04-15). "ReasonML with React Hooks Tutorial — Building a Pomodoro Timer".
  6. ^ "BuckleScript". bloomberg. Retrieved 2022-09-11.
  7. ^ "BuckleScript & Reason Rebranding". rescript-lang. Retrieved 2022-09-11.