# facebook/reason

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/facebook-reason).**

10,315 stars · 434 forks · OCaml · MIT

## Links

- GitHub: https://github.com/facebook/reason
- Homepage: http://reasonml.github.io
- awesome-repositories: https://awesome-repositories.com/repository/facebook-reason.md

## Description

Reason is a statically typed programming language and compiler based on the OCaml ecosystem. It translates high-level, type-safe source code into either JavaScript or OCaml output, providing a typed alternative for web and system development.

The language focuses on providing rigorous type safety and a robust module system while integrating with the JavaScript ecosystem. It allows for the development of applications that leverage existing JavaScript libraries while utilizing a more rigid type system to eliminate common runtime crashes and data mismatches.

The project covers capabilities including algebraic data type modeling, type inference, and namespace isolation. It employs a statically typed abstract syntax tree to validate program logic before transpiling to JavaScript or compiling to OCaml bytecode and machine code.

## Tags

### Programming Languages & Runtimes

- [OCaml Ecosystem Compilers](https://awesome-repositories.com/f/programming-languages-runtimes/ocaml-ecosystem-compilers.md) — Acts as a compiler that translates high-level type-safe source code into efficient OCaml or JavaScript output.
- [Algebraic Data Types](https://awesome-repositories.com/f/programming-languages-runtimes/algebraic-data-types.md) — Implements language-level support for sum and product types to model complex data structures safely.
- [OCaml Backends](https://awesome-repositories.com/f/programming-languages-runtimes/compiler-interpreter-internals/compiler-infrastructure/compiler-backends/ocaml-backends.md) — Transforms source code into OCaml bytecode or machine code to leverage the OCaml compiler.
- [Source-to-JavaScript Transpilers](https://awesome-repositories.com/f/programming-languages-runtimes/javascript-transpilers/source-to-javascript-transpilers.md) — Provides a transpiler that converts type-safe source code into optimized JavaScript for web and Node.js environments.
- [OCaml-Based Syntaxes](https://awesome-repositories.com/f/programming-languages-runtimes/ocaml-based-syntaxes.md) — Uses an OCaml-based syntax to create efficient programs targeted toward multiple runtime environments.
- [Statically Typed Languages](https://awesome-repositories.com/f/programming-languages-runtimes/programming-language-varieties/programming-languages/type-systems/type-checking-disciplines/statically-typed-languages.md) — Enforces type safety through static analysis during the compilation process to catch errors before runtime.
- [Typed JavaScript Alternatives](https://awesome-repositories.com/f/programming-languages-runtimes/programming-language-varieties/programming-languages/type-systems/type-checking-disciplines/typed-javascript-alternatives.md) — Offers a rigorous type system and robust module system as a typed alternative for the JavaScript ecosystem.
- [Source Code Compilers](https://awesome-repositories.com/f/programming-languages-runtimes/source-code-compilers.md) — Translates statically typed source code into target languages to prevent memory errors and runtime type mismatches. ([source](https://github.com/facebook/reason#readme))
- [Module Namespaces](https://awesome-repositories.com/f/programming-languages-runtimes/module-namespaces.md) — Utilizes a robust module system and hierarchical namespaces to organize code and prevent identifier collisions.
- [Typed Abstract Syntax Trees](https://awesome-repositories.com/f/programming-languages-runtimes/typed-abstract-syntax-trees.md) — Employs a statically typed abstract syntax tree to validate program logic before transpilation or compilation.

### Software Engineering & Architecture

- [Type Inference Engines](https://awesome-repositories.com/f/software-engineering-architecture/type-safe-data-handling/type-inference-engines.md) — Features an automated engine that determines expression types without requiring explicit developer annotations.

### Web Development

- [JavaScript Library Integrations](https://awesome-repositories.com/f/web-development/javascript-library-integrations.md) — Allows the development of applications that integrate with and leverage existing JavaScript libraries.
- [Type-Safe Web Frameworks](https://awesome-repositories.com/f/web-development/type-safe-web-frameworks.md) — Enables building web applications with static types to eliminate common runtime crashes and data mismatches.

### Part of an Awesome List

- [Programming Languages](https://awesome-repositories.com/f/awesome-lists/devtools/programming-languages.md) — Supports the ReasonML language and its ecosystem.
