ReScript: Difference between revisions
Moved page from wikipedia:en:Draft:ReScript ([[Edithistory:|history]]) |
m remove duplicates internal links |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 34: | Line 34: | ||
|publisher = ReScript Association | |publisher = ReScript Association | ||
|access-date = 2023-02-24 | |access-date = 2023-02-24 | ||
|via = | |via = GitHub | ||
}}</ref> | }}</ref> | ||
|parser: [[MIT License]]<ref name=parser>{{cite web | |parser: [[MIT License]]<ref name=parser>{{cite web | ||
| Line 42: | Line 42: | ||
|publisher = ReScript Association | |publisher = ReScript Association | ||
|access-date = 2023-02-24 | |access-date = 2023-02-24 | ||
|via = | |via = GitHub | ||
}}</ref> | }}</ref> | ||
}} | }} | ||
| file_ext = .res, .resi | | file_ext = .res, .resi | ||
| website = {{URL|{{wikidata|property|eid=Q116885321|P856|P407=Q1860}}}}{{EditAtWikidata|qid=Q116885321|pid=P856}} | | website = {{URL|{{wikidata|property|eid=Q116885321|P856|P407=Q1860}}}}{{EditAtWikidata|qid=Q116885321|pid=P856}} | ||
| influenced by = | | influenced by = OCaml, [[Reason (programming language)|Reason]], [[JavaScript]] | ||
}} | }} | ||
'''ReScript''' (formerly BuckleScript) is a general-purpose programming language that [[source-to-source compiler| | '''ReScript''' (formerly BuckleScript) is a general-purpose programming language that [[source-to-source compiler|transpiles]] to JavaScript and is mainly used for web development. | ||
Based on | Based on OCaml, the ReScript language supports a [[strong and weak typing|strong]] and [[type system#Static type checking|sound]] [[semantic analysis (computer science)|static]] type system, [[type inference]], [[parametric polymorphism]], [[tail recursion]], [[pattern matching]], first-class [[closure (computer science)|closures]], [[function object#Other meanings|functors (parametric modules)]] and [[exception handling]].<ref>{{cite web |last=Duarte |first=Diel |date=2021-04-27 |df=mdy |url=https://www.dielduarte.dev/blog/en/rescript-from-a-js-dev-point-of-view/ |title=Rescript from a JS dev point of view |department=Blog |website=Diel Duarte |access-date=2023-03-29}}<!-- https://github.com/dielduarte/blog --></ref><ref>{{cite book |isbn=978-1-4842-8887-0 |url=https://link.springer.com/book/10.1007/978-1-4842-8888-7 |title=Introducing ReScript. Functional Programming for Web Applications |first=Danny |last=Yang|year=2023 |doi=10.1007/978-1-4842-8888-7 |s2cid=255208264 }}</ref> | ||
ReScript provides first-class bindings for [[React (web framework)|React]] based web applications,<ref>{{cite web |url=https://rescript-lang.org/docs/react/latest/introduction |title=Introduction |department=React Docs |website=ReScript Project |access-date=2023-05-12}}</ref> and [[React Native]] desktop applications.<ref>{{cite web |url=https://rescript-lang.org/docs/react/latest/introduction |title=ReScript React Native |website=ReScript React Native |access-date=2023-05-12}}</ref> | ReScript provides first-class bindings for [[React (web framework)|React]] based web applications,<ref>{{cite web |url=https://rescript-lang.org/docs/react/latest/introduction |title=Introduction |department=React Docs |website=ReScript Project |access-date=2023-05-12}}</ref> and [[React Native]] desktop applications.<ref>{{cite web |url=https://rescript-lang.org/docs/react/latest/introduction |title=ReScript React Native |website=ReScript React Native |access-date=2023-05-12}}</ref> | ||
== History == | == History == | ||
ReScript originally started in 2015 as BuckleScript, an OCaml to JavaScript transpiler created by Hongbo Zhang<ref name="credits"/> while at [[Bloomberg L.P.|Bloomberg]]. It was released as open source in 2016<ref>{{cite web |url=https://www.bloomberg.com/company/press/open-source-at-bloomberg-introducing-bucklescript/ |title=Open Source at Bloomberg: Introducing BuckleScript |department=Press |website= | ReScript originally started in 2015 as BuckleScript, an OCaml to JavaScript transpiler created by Hongbo Zhang<ref name="credits"/> while at [[Bloomberg L.P.|Bloomberg]]. It was released as open source in 2016<ref>{{cite web |url=https://www.bloomberg.com/company/press/open-source-at-bloomberg-introducing-bucklescript/ |title=Open Source at Bloomberg: Introducing BuckleScript |department=Press |website=Bloomberg LP |date=2016-05-12 |df=mdy |access-date=2023-05-12}}</ref> and was subsequently included as a part of the ReasonML toolchain, where it was modified to also compile Reason, another language derived from OCaml, to JavaScript. | ||
In 2020, BuckleScript was rebranded to ReScript as a separate language, dropping support for native code compilation in exchange for more JavaScript-like syntax and better integration with the web ecosystem<ref>{{cite web |url=https://rescript-lang.org/blog/bucklescript-is-rebranding |title=BuckleScript & Reason Rebranding |department=Blog |website=ReScript Project |date=2020-08-10 |df=mdy |access-date=2023-05-12}}</ref><ref>{{cite web |last=Akinci |first=Ersin |date=2020-12-31 |df=mdy |url=https://ersin-akinci.medium.com/confused-about-rescript-rescript-reason-reasonml-and-bucklescript-explained-ab4230555230 |title=Confused about ReScript? ReScript, Reason, ReasonML, and BuckleScript explained |department=Ersin Akinci |website=[[Medium (website)|Medium]] |access-date=2023-07-05}}</ref><ref>{{cite web |last=Alzate |first=Jayson |date=2021-01-27 |df=mdy |url=https://medium.com/swlh/learn-rescript-a-safer-way-to-write-javascript-part-1-e0b56d447c44 |title=Learn ReScript — A Safer Way to Write JavaScript— Part 1 |department=The Startup |website= | In 2020, BuckleScript was rebranded to ReScript as a separate language, dropping support for native code compilation in exchange for more JavaScript-like syntax and better integration with the web ecosystem<ref>{{cite web |url=https://rescript-lang.org/blog/bucklescript-is-rebranding |title=BuckleScript & Reason Rebranding |department=Blog |website=ReScript Project |date=2020-08-10 |df=mdy |access-date=2023-05-12}}</ref><ref>{{cite web |last=Akinci |first=Ersin |date=2020-12-31 |df=mdy |url=https://ersin-akinci.medium.com/confused-about-rescript-rescript-reason-reasonml-and-bucklescript-explained-ab4230555230 |title=Confused about ReScript? ReScript, Reason, ReasonML, and BuckleScript explained |department=Ersin Akinci |website=[[Medium (website)|Medium]] |access-date=2023-07-05}}</ref><ref>{{cite web |last=Alzate |first=Jayson |date=2021-01-27 |df=mdy |url=https://medium.com/swlh/learn-rescript-a-safer-way-to-write-javascript-part-1-e0b56d447c44 |title=Learn ReScript — A Safer Way to Write JavaScript— Part 1 |department=The Startup |website=Medium |access-date=2023-03-29}}</ref><ref>{{cite web |last=Kozlov |first=Ilya |date=2022-07-12 |df=mdy |url=https://blog.noveogroup.com/2022/07/rescript-fast-simple-fully-typed-javascript-future |title=ReScript: Fast, Simple, Fully Typed JavaScript from the Future |department=Blog |website=Noveo Group |access-date=2023-03-29}}</ref> | ||
== See also == | == See also == | ||
| Line 65: | Line 65: | ||
* [[Elm (programming language)|Elm]]: a functional language that uses an abstraction called ports to communicate with JavaScript | * [[Elm (programming language)|Elm]]: 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 | * [[PureScript]]: a strongly-typed, purely-functional programming language that compiles to JavaScript | ||
* | * Reason: a functional programming language based on OCaml, which can be compiled to JavaScript using ReScript's compiler | ||
== References == | == References == | ||
| Line 73: | Line 73: | ||
*{{cite book |last1=Wang |first1=Liang |last2=Zhao |first2=Jianxin |date=2023 |chapter=Compiler Backends |title= Architecture of Advanced Numerical Analysis Systems |location=Berkeley, CA |publisher=[[Apress]] |doi=10.1007/978-1-4842-8853-5_8 |doi-access=free |isbn=978-1-4842-8852-8}} | *{{cite book |last1=Wang |first1=Liang |last2=Zhao |first2=Jianxin |date=2023 |chapter=Compiler Backends |title= Architecture of Advanced Numerical Analysis Systems |location=Berkeley, CA |publisher=[[Apress]] |doi=10.1007/978-1-4842-8853-5_8 |doi-access=free |isbn=978-1-4842-8852-8}} | ||
*{{cite conference |last1=Lubin |first1=Justin |last2=Chasins |first2=Sarah E. |date=2021-10-15 |df=mdy |title=How statically-typed functional programmers write code |book-title=Proceedings of the ACM on Programming Languages |volume=5, OOPSLA |at=Article No.: 155 |conference=OOPSLA 2021 |doi=10.1145/3485532 |doi-access=free |issn=2475-1421}} | *{{cite conference |last1=Lubin |first1=Justin |last2=Chasins |first2=Sarah E. |date=2021-10-15 |df=mdy |title=How statically-typed functional programmers write code |book-title=Proceedings of the ACM on Programming Languages |volume=5, OOPSLA |at=Article No.: 155 |conference=OOPSLA 2021 |doi=10.1145/3485532 |doi-access=free |issn=2475-1421}} | ||
*{{cite conference |last1=Charguéraud |first1=Arthur |last2=Schmitt |first2=Alan |last3=Wood |first3=Thomas |date=2018-04-23 |df=mdy |title=JSExplain: A Double Debugger for JavaScript |book-title=Companion Proceedings of | *{{cite conference |last1=Charguéraud |first1=Arthur |last2=Schmitt |first2=Alan |last3=Wood |first3=Thomas |date=2018-04-23 |df=mdy |title=JSExplain: A Double Debugger for JavaScript |book-title=Companion Proceedings of The Web Conference 2018 |pages=691–699 |conference=WWW '18 |doi=10.1145/3184558.3185969 |doi-access=free |isbn=978-1-4503-5640-4}} | ||
*{{cite thesis |last=Rocha |first=Murilo Giacometti |date=2019 |title=Testing of OCaml exceptions by effect-driven generation of programs |url=https://project-archive.inf.ed.ac.uk/ | *{{cite thesis |last=Rocha |first=Murilo Giacometti |date=2019 |title=Testing of OCaml exceptions by effect-driven generation of programs |url=https://project-archive.inf.ed.ac.uk/bitstream/11701/11561/1/Marina_Polubelova.pdf |type= |degree=Master of Science |publisher=[[School of Informatics, University of Edinburgh]] |docket= |oclc= |access-date=2023-07-04}} | ||
*{{cite thesis |last=Mikkonen |first=Juuso |date=2019-11-27 |df=mdy |title=Staattisesti tyypitetyt ohjelmointikielet JavaScript-ekosysteemissä: tyyppijärjestelmien näkökulma |trans-title=Statically typed programming languages in the JavaScript ecosystem: A type system perspective |lang=fi,en |url=http://urn.fi/URN:NBN:fi:aalto-202001261829 |degree=Master's |publisher=[[Aalto University School of Science]] |access-date=2023-07-04}} | *{{cite thesis |last=Mikkonen |first=Juuso |date=2019-11-27 |df=mdy |title=Staattisesti tyypitetyt ohjelmointikielet JavaScript-ekosysteemissä: tyyppijärjestelmien näkökulma |trans-title=Statically typed programming languages in the JavaScript ecosystem: A type system perspective |lang=fi,en |url=http://urn.fi/URN:NBN:fi:aalto-202001261829 |degree=Master's |publisher=[[Aalto University School of Science]] |access-date=2023-07-04}} | ||
*{{cite thesis |last=Marina |first=Polubelova |date=2017 |script-title=ru:Компиляция сертифицированных F*-программ в робастные Web-приложения |trans-title=Compiling Verified F* Programs to Robust Web Applications |lang=ru,en |url=https://dspace.spbu.ru/bitstream/11701/11561/1/Marina_Polubelova.pdf |type= |degree=Master's |chapter= |publisher=[[Saint Petersburg State University]] |docket= |oclc= |access-date=2023-07-04}} | *{{cite thesis |last=Marina |first=Polubelova |date=2017 |script-title=ru:Компиляция сертифицированных F*-программ в робастные Web-приложения |trans-title=Compiling Verified F* Programs to Robust Web Applications |lang=ru,en |url=https://dspace.spbu.ru/bitstream/11701/11561/1/Marina_Polubelova.pdf |type= |degree=Master's |chapter= |publisher=[[Saint Petersburg State University]] |docket= |oclc= |access-date=2023-07-04}} | ||
Latest revision as of 02:19, 27 August 2026
| File:Rescript-logo.svg | |
| Paradigm | Multi-paradigm: functional, imperative, modular, object-oriented |
|---|---|
| Family | ML |
| Designed by | Hongbo Zhang.[1] |
| Developer | ReScript Association |
| First appeared | 2015[1] |
| Implementation language | OCaml |
| License |
|
| Filename extensions | .res, .resi |
| Website | {{URL|example.com|optional display text}} |
| Influenced by | |
| OCaml, Reason, JavaScript | |
Search ReScript on Amazon.
ReScript (formerly BuckleScript) is a general-purpose programming language that transpiles to JavaScript and is mainly used for web development.
Based on OCaml, the ReScript language supports a strong and sound static type system, type inference, parametric polymorphism, tail recursion, pattern matching, first-class closures, functors (parametric modules) and exception handling.[4][5]
ReScript provides first-class bindings for React based web applications,[6] and React Native desktop applications.[7]
History
ReScript originally started in 2015 as BuckleScript, an OCaml to JavaScript transpiler created by Hongbo Zhang[1] while at Bloomberg. It was released as open source in 2016[8] and was subsequently included as a part of the ReasonML toolchain, where it was modified to also compile Reason, another language derived from OCaml, to JavaScript.
In 2020, BuckleScript was rebranded to ReScript as a separate language, dropping support for native code compilation in exchange for more JavaScript-like syntax and better integration with the web ecosystem[9][10][11][12]
See also
- Elm: 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
- Reason: a functional programming language based on OCaml, which can be compiled to JavaScript using ReScript's compiler
References
- ↑ 1.0 1.1 1.2 "CREDITS.md". rescript-lang/rescript-compiler. ReScript Association. Retrieved 2023-02-24 – via GitHub.
- ↑ "LICENSE". rescript-lang/rescript-compiler. ReScript Association. Retrieved 2023-02-24 – via GitHub.
- ↑ "res_syntax/LICENSE". rescript-lang/rescript-compiler. ReScript Association. Retrieved 2023-02-24 – via GitHub.
- ↑ Duarte, Diel (April 27, 2021). "Rescript from a JS dev point of view". Blog. Diel Duarte. Retrieved 2023-03-29.
- ↑ Yang, Danny (2023). Introducing ReScript. Functional Programming for Web Applications. doi:10.1007/978-1-4842-8888-7. ISBN 978-1-4842-8887-0. Unknown parameter
|s2cid=ignored (help) Search this book on
- ↑ "Introduction". React Docs. ReScript Project. Retrieved 2023-05-12.
- ↑ "ReScript React Native". ReScript React Native. Retrieved 2023-05-12.
- ↑ "Open Source at Bloomberg: Introducing BuckleScript". Press. Bloomberg LP. May 12, 2016. Retrieved 2023-05-12.
- ↑ "BuckleScript & Reason Rebranding". Blog. ReScript Project. August 10, 2020. Retrieved 2023-05-12.
- ↑ Akinci, Ersin (December 31, 2020). "Confused about ReScript? ReScript, Reason, ReasonML, and BuckleScript explained". Ersin Akinci. Medium. Retrieved 2023-07-05.
- ↑ Alzate, Jayson (January 27, 2021). "Learn ReScript — A Safer Way to Write JavaScript— Part 1". The Startup. Medium. Retrieved 2023-03-29.
- ↑ Kozlov, Ilya (July 12, 2022). "ReScript: Fast, Simple, Fully Typed JavaScript from the Future". Blog. Noveo Group. Retrieved 2023-03-29.
Further reading
- Wang, Liang; Zhao, Jianxin (2023). "Compiler Backends". Architecture of Advanced Numerical Analysis Systems. Berkeley, CA: Apress. doi:10.1007/978-1-4842-8853-5_8. ISBN 978-1-4842-8852-8. Search this book on

- Lubin, Justin; Chasins, Sarah E. (October 15, 2021). "How statically-typed functional programmers write code". Proceedings of the ACM on Programming Languages. OOPSLA 2021. 5, OOPSLA. Article No.: 155. doi:10.1145/3485532. ISSN 2475-1421.
- Charguéraud, Arthur; Schmitt, Alan; Wood, Thomas (April 23, 2018). "JSExplain: A Double Debugger for JavaScript". Companion Proceedings of The Web Conference 2018. WWW '18. pp. 691–699. doi:10.1145/3184558.3185969. ISBN 978-1-4503-5640-4.
- Rocha, Murilo Giacometti (2019). Testing of OCaml exceptions by effect-driven generation of programs (PDF) (Master of Science thesis). School of Informatics, University of Edinburgh. Retrieved 2023-07-04.
- Mikkonen, Juuso (November 27, 2019). Staattisesti tyypitetyt ohjelmointikielet JavaScript-ekosysteemissä: tyyppijärjestelmien näkökulma [Statically typed programming languages in the JavaScript ecosystem: A type system perspective] (Master's thesis) (in suomi and English). Aalto University School of Science. Retrieved 2023-07-04.
- Marina, Polubelova (2017). Компиляция сертифицированных F*-программ в робастные Web-приложения [Compiling Verified F* Programs to Robust Web Applications] (PDF) (Master's thesis) (in русский and English). Saint Petersburg State University. Retrieved 2023-07-04.
External links
| Wikibooks has a book on the topic of: OCaml |
- Lua error in Module:Official_website at line 90: attempt to index field 'wikibase' (a nil value).
| Stub icon | This programming-language-related article is a stub. You can help EverybodyWiki by expanding it. |
This article "ReScript" is from Wikipedia. The list of its authors can be seen in its historical and/or the page Edithistory:ReScript. Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.
- CS1 suomi-language sources (fi)
- CS1 uses русский-language script (ru)
- CS1 русский-language sources (ru)
- Programming language topic stubs
- Cross-platform free software
- Free compilers and interpreters
- Source-to-source compilers
- ML programming language family
- OCaml programming language family
- JavaScript programming language family
- High-level programming languages
- Functional languages
- Object-oriented programming languages
- Pattern matching programming languages
- Statically typed programming languages
- Programming languages created in 2015
- Software using the LGPL license
- Software using the MIT license
