ReScript

ReScript
ParadigmsMulti-paradigm: functional, imperative, modular, object-oriented
First appearedJuly 1, 2020; 5 years ago (2020-07-01)[1]
Stable release
12.3.0[2] Edit this on Wikidata / May 20, 2026; 15 days ago (May 20, 2026)
Implementation languageOCaml
LicenseMIT
Filename extensions.res, .resi
Websitehttps://rescript-lang.org/ Edit this on Wikidata
Influenced by
OCaml, Reason, JavaScript

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

Language characteristics

ReScript shares characteristics with its ancestors Reason and OCaml. It is a statically typed language with a sound type system, and it emphasizes functional programming.[3]

However, ReScript’s syntax has started to evolve away from OCaml and closer to JavaScript. For example, it uses the same arithmetic operators for integers and floating point numbers (like JavaScript),[4] while OCaml[5] and Reason[6] use separate operators.

Since ReScript transpiles to JavaScript, it can access the entire JavaScript ecosystem. It can both call JavaScript functions and have its functions called from JavaScript.[7] It has direct language support for the React front-end web library, including JSX.[3]

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.[8][9] 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.[3][10]

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.[10]

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.[3][11] ReScript’s support for compiling OCaml ended with version 12,[12] released in 2025.[4]

References

  1. ^ a b Lou, Cheng (July 1, 2020). "A New Syntax for BuckleScript". ReScript. Retrieved December 21, 2025.
  2. ^ "Release 12.3.0". May 20, 2026. Retrieved May 20, 2026.
  3. ^ a b c d e Yang, Danny (December 2022). "Introduction". Introducing ReScript: Functional Programming for Web Applications. Apress.
  4. ^ a b Curtis, Daniel (December 31, 2025). "ReScript 12.0 Released with New Build System". InfoQ. C4Media. Retrieved January 3, 2026.
  5. ^ Madhavapeddy, Anil; Minsky, Yaron (October 2022). Real World OCaml (2nd ed.). Cambridge University Press. p. 10.
  6. ^ Eisenberg, J. David (April 9, 2019). Web Development with ReasonML. Pragmatic Bookshelf. pp. 5–8.
  7. ^ Yang 2022, pp. 203–210.
  8. ^ "BuckleScript: The 1.0 release has arrived!". Bloomberg. September 8, 2016. Retrieved December 21, 2025.
  9. ^ "Open Source at Bloomberg: Introducing BuckleScript". Bloomberg. May 12, 2015. Retrieved September 11, 2022.
  10. ^ a b Zhang, Hongbo (February 7, 2021). "A Short History of ReScript (BuckleScript)". OCaml Discourse. Retrieved December 21, 2025.
  11. ^ ReScript Team (August 10, 2020). "BuckleScript & Reason Rebranding". ReScript. Retrieved September 11, 2022.
  12. ^ "Migrate to v12: Language & syntax". ReScript. Retrieved November 12, 2025.

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.