ReasonML (commonly called Reason) is a syntax and toolchain, created by Jordan Walke at Facebook and first released in 2016, that provides a JavaScript-like syntax layered over the OCaml programming language and its type system, letting developers write statically typed, functional OCaml code using familiar curly-brace, C-like syntax rather than OCaml's traditional syntax. Reason code compiles either to native code through the standard OCaml toolchain or to JavaScript through the BuckleScript/ReScript compiler, aiming to bring OCaml's strong type system and functional programming style to web developers already comfortable with JavaScript's surface syntax.
Facts
Classification
Typing Discipline Typing Discipline First Released SignificanceGives OCaml a JavaScript-like syntax and can compile to JavaScript via Melange. 2 FAQs
What can Reason code be compiled to?
The Reason documentation at reasonml.github.io says: "Reason can be compiled to native, bytecode, and JavaScript, with an ongoing plan for WebAssembly."
How does Reason handle type safety?
The Reason documentation at reasonml.github.io says: "The type system offers a state-of-the-art sound type system, soundness which means it is guaranteed there will be no runtime type errors after type checking and provides strong type inference, types are rarely required to be written manually, while maintaining soundness."
Does Reason support JSX?
The Reason documentation at reasonml.github.io says: "JSX is part of the language. JSX is an embeddable XML-like syntax, used to describe what the UI should look like, and composes with the rest of the language."
Connections
Built On
Direction correction: ReasonML is a syntax and toolchain over OCaml, not the reverse.
Follows Typing Discipline
In Field
Source Reason (programming language) - Wikipedia
Licensed Under
Sources
1. Wikidata: ReasonML
- Wikidata Q63565848, class allow-list match (w-wdresolver-0926)
- Wikidata Q63565848 P571 (inception)
- Wikidata Q63565848 P275 (license)
- Wikidata Q63565848 P7078 (typing discipline)
View the Source2. Reason (programming language) - Wikipedia
Lead
Reason uses many syntax elements from JavaScript
In Group: ML Dialects, Lead section
Reason, also known as ReasonML, is a programming language and toolchain that is part of the OCaml programming language ecosystem.
- In Field: Programming Language Theory, Lead paragraph
View the SourceReader Challenges (0)
No disputes yet. Spotted an error or a better source? Open the first one.
Sign in to dispute this or suggest a correction.