Reason (programming Language)
   HOME

TheInfoList



OR:

Reason, also known as ReasonML, is a
syntax In linguistics, syntax () is the study of how words and morphemes combine to form larger units such as phrases and sentences. Central concerns of syntax include word order, grammatical relations, hierarchical sentence structure ( constituency) ...
extension and toolchain for
OCaml OCaml ( , formerly Objective Caml) is a general-purpose programming language, general-purpose, multi-paradigm programming language which extends the Caml dialect of ML (programming language), ML with object-oriented programming, object-oriented ...
created by Jordan Walke, who also created
React REACT or React may refer to: Science and technology *REACT (telescope), a telescope at Fenton Hill Observatory, New Mexico, US Computing * React (JavaScript library) , a JavaScript library for building user interfaces, from Facebook ** React Nati ...
, at
Facebook Facebook is an online social media and social networking service owned by American company Meta Platforms. Founded in 2004 by Mark Zuckerberg with fellow Harvard College students and roommates Eduardo Saverin, Andrew McCollum, Dustin M ...
. Reason offers a syntax familiar to
JavaScript JavaScript (), often abbreviated as JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. As of 2022, 98% of Website, websites use JavaScript on the Client (computing), client side ...
programmers, and compiles to native code using OCaml's compiler toolchain. Reason code may also be compiled to
JavaScript JavaScript (), often abbreviated as JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. As of 2022, 98% of Website, websites use JavaScript on the Client (computing), client side ...
using the ''ReScript'' compiler. The Reason community officially provides ReasonReact as a solution for
React REACT or React may refer to: Science and technology *REACT (telescope), a telescope at Fenton Hill Observatory, New Mexico, US Computing * React (JavaScript library) , a JavaScript library for building user interfaces, from Facebook ** React Nati ...
-based web applications.


BuckleScript and ReScript

Reason was originally compiled to JavaScript using the BuckleScript compiler, which was created at Bloomberg L.P. In 2020, BuckleScript was rebranded to
ReScript In legal terminology, a rescript is a document that is issued not on the initiative of the author, but in response (it literally means 'written back') to a specific demand made by its addressee. It does not apply to more general legislation. Over ...
, essentially creating a separate language that had different syntax from Reason and only compiled to JavaScript. The ReScript compiler continues to support Reason syntax, and the two languages share that part of the toolchain.


See also

*
Elm Elms are deciduous and semi-deciduous trees comprising the flowering plant genus ''Ulmus'' in the plant family Ulmaceae. They are distributed over most of the Northern Hemisphere, inhabiting the temperate and tropical-montane regions of North ...
: 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 In legal terminology, a rescript is a document that is issued not on the initiative of the author, but in response (it literally means 'written back') to a specific demand made by its addressee. It does not apply to more general legislation. Over ...
: a functional programming language that compiles to JavaScript and shares part of the Reason/OCaml toolchain


References


External links


Official website

ReasonReact
* Cross-platform free software Extensible syntax programming languages Free compilers and interpreters Functional languages ML programming language family Object-oriented programming languages OCaml programming language family Pattern matching programming languages Statically typed programming languages Programming languages created in 2016 High-level programming languages Software using the MIT license {{Prog-lang-stub