Top Qs
Timeline
Chat
Perspective

ReScript (programming language)

Language that compiles to JavaScript From Wikipedia, the free encyclopedia

Remove ads

ReScript is a high-level programming language that transpiles to JavaScript. Its syntax is descended from the Reason programming language, which is an alternate syntax for OCaml.

Quick facts Paradigms, First appeared ...

Since ReScript transpiles to JavaScript, it can access the entire JavaScript ecosystem.[3] It has direct language support for the React front-end web library, including JSX.[4]

Because ReScript is descended from Reason and OCaml, it is a statically typed language with a sound type system.[5]

Remove ads

History

ReScript traces its roots back to BuckleScript, a compiler that compiled OCaml to JavaScript, which was first released in 2016 by Bloomberg L.P.[6][7] In the same year, the Reason programming language was released, which was an alternate syntax for OCaml that was more similar to JavaScript. As both projects were influenced by JavaScript, Reason and BuckleScript soon became an integrated toolchain.[8][9]

However, the BuckleScript team and the Reason team had different priorities. The Reason team wanted to maintain compatibility with the OCaml ecosystem, while the BuckleScript team wanted to be able to change the syntax to give the best developer experience to JavaScript programmers.[9]

In 2020, BuckleScript introduced a new syntax that started to diverge from Reason.[1] A month later, the BuckleScript team rebranded its toolchain to ReScript, to focus solely on the JavaScript ecosystem and essentially becoming its own language, distinct from Reason.[10] ReScript’s support for compiling OCaml ended with version 12,[11] released in 2025.[12]

Remove ads

References

Loading related searches...

Wikiwand - on

Seamless Wikipedia browsing. On steroids.

Remove ads