Racket (programming language)
Racket is a general-purpose, multi-paradigm programming language. The Racket language is a modern dialect of Lisp and a descendant of Scheme. It is designed as a platform for programming language design and implementation. In addition to the core Racket language, Racket is also used to refer to the family of programming languages and set of tools supporting development on and with Racket. Racket is also used for scripting, computer science education, and research. The Racket platform provides an implementation of the Racket language, including a runtime system, libraries, and compiler supporting several compiler modes: machine code, cross-platform, interpreted, and just-in-time compilation (JIT) along with the DrRacket integrated development environment (IDE) written in Racket. Racket is used by the ProgramByDesign outreach program, which aims to turn computer science into "an indispensable part of the liberal arts curriculum". The core Racket language is known for its extensive...
Racket is a general-purpose, multi-paradigm programming language. The Racket language is a modern dialect of Lisp and a descendant of Scheme. It is designed as a platform for programming language design and implementation. In addition to the core Racket language, Racket is also used to refer to the family of programming languages and set of tools supporting development on and with Racket. Racket is also used for scripting, computer science education, and research. The Racket platform provides an implementation of the Racket language, including a runtime system, libraries, and compiler supporting several compiler modes: machine code, cross-platform, interpreted, and just-in-time compilation (JIT) along with the DrRacket integrated development environment (IDE) written in Racket. Racket is used by the ProgramByDesign outreach program, which aims to turn computer science into "an indispensable part of the liberal arts curriculum". The core Racket language is known for its extensive macro system which enables creating embedded and domain-specific languages, language constructs such as classes or modules, and separate dialects of Racket with different semantics. The platform distribution is free and open-source software distributed under the Apache 2.0 and MIT licenses. Extensions and packages written by the community may be uploaded to Racket's package catalog. ==History== ===Development=== Matthias Felleisen founded PLT Inc. in the mid 1990s, first as a research group, soon after as a project dedicated to producing pedagogic materials for novice programmers (lectures, exercises/projects, software). In January 1995, the group decided to develop a pedagogic programming environment based on Scheme. Matthew Flatt cobbled together MrEd, the original virtual machine for Racket, from libscheme, wxWidgets, and a few other free systems. In the years that followed, a team including Flatt, Robby Findler, Shriram Krishnamurthi, Cormac Flanagan, and many others produced DrScheme, a programming environment for novice Scheme programmers and a research environment for gradual typing. The main development language that DrScheme supported was named PLT Scheme. In parallel, the team began conducting workshops for high school teachers, training them in program design and functional programming. Field tests with these teachers and their students provided essential clues for directing the development. Over the following years, PLT added teaching languages, an algebraic stepper, a transparent read–eval–print loop, a constructor-based printer, and many other innovations to DrScheme, producing an application-quality pedagogic program development environment. By 2001, the core team (Felleisen, Findler, Flatt, Krishnamurthi) had also written and published their first textbook, How to Design Programs, based on their teaching philosophy. The Racket Manifesto details the principles driving the development of Racket, presents the evaluation framework behind the design process, and details opportunities for future improvements. ===Version history=== The first generation of PLT Scheme revisions introduced features for programming in the large with both modules and classes. Version 42 introduced units – a first-class module system – to complement classes for large scale development. The class system gained features (e.g., Java-style interfaces) and also lost several features (e.g. multiple inheritance) throughout these versions. The language evolved throughout a number of successive versions, and gaining milestone popularity in Version 53, leading to extensive work and the following Version 100, which would be equivalent to a "1.0" release in current popular version systems. The next major revision was named Version 200, which introduced a new default module system that cooperates with macros. In particular, the module system ensures that run-time and compile-time computation are separated to support a "tower of languages". Unlike units, these modules are not first-class objects. Version 300 introduced Unicode support, foreign library support, and refinements to the class system. Later on, the 300 series improved the performance of the language runtime with an addition of a JIT compiler and a switch to a default generational garbage collection. By the next major release, the project had switched to a more conventional sequence-based version numbering. Version 4.0 introduced the #lang shorthand to specify the language that a module is written in. Further, the revision introduced immutable pairs and lists, support for fine-grained parallelism, and a statically-typed dialect. On 7 June 2010, PLT Scheme was renamed Racket. The renaming coincided with the release of Version 5.0. Subsequently, the graphical user interface (GUI) backend was rewritten in Racket from C++ in Version 5.1 using native UI toolkits on all platforms. Version 5.2 included a background syntax checking tool, a new plotting library, a database library, and a new extended REPL. Version 5.3 included a new submodule feature for optionally loaded modules, new optimization tools, a JSON library, and other features. Version 5.3.1 introduced major improvements to DrRacket: the background syntax checker was turned on by default and a new documentation preview tool was added. In version 6.0, Racket released its second-generation package management system. As part of this development, the principal DrRacket and Racket repository was reorganized and split into a large set of small packages, making it possible to install a minimal racket and to install only those packages needed. Version 7 of Racket was released with a new macro expander written in Racket as part the preparations for supporting moving to the Chez Scheme runtime system and supporting multiple runtime systems. On 19 November 2019, Racket 7.5 was released. It had a less restrictive license – either the Apache 2.0 license or the MIT license. On 13 February 2021, Racket 8.0 was released. Racket 8.0 marks the first release where Racket with the Chez Scheme runtime system, known as Racket CS, is the default implementation. Racket CS is faster, easier to maintain and develop, backward-compatible with existing Racket programs, and has better parallel garbage collection. ===Integrated language extensibility and macros=== The features that most clearly distinguish Racket from other languages in the Lisp family are its integrated language extensibility features that support building new domain-specific and general-purpose languages. Racket's extensibility features are built into the module system to allow context-sensitive and module-level control over syntax. For example, the #%app syntactic form can be overridden to change the semantics of function application. Similarly, the #%module-begin form allows arbitrary static analysis of the entire module. Since any module can be used as a language, via the #lang notation, this effectively means that virtually any aspect of the language can be programmed and controlled. The module-level extensibility features are combined with a Scheme-like hygienic macro system, which provides more features than Lisp's s-expression manipulation system, Scheme 84's hygienic extend-syntax macros, or R5RS's syntax-rules. Indeed, it is fair to say that the macro system is a carefully tuned application programming interface (API) for compiler extensions. Using this compiler API, programmers can add features and entire domain-specific languages in a manner that makes them completely indistinguishable from built-in language constructs. The macro system in Racket has been used to construct entire language dialects. This includes Typed Racket, which is a gradually typed dialect of Racket that eases the migration from untyped to typed code, Lazy Racket—a dialect with lazy evaluation, and Hackett, which combines Haskell and Racket. The pedagogical programming language Pyret was originally implemented in Racket. Other dialects include FrTime (functional reactive programming), Scribble (documentation language), Slideshow (presentation language), and several languages for education. Racket's core distribution provides libraries to aid the development of programming languages. Such languages are not restricted to s-expression based syntax. In addition to conventional readtable-based syntax extensions, the directive #lang enables the invocation of arbitrary parsers, which can be implemented using the parser tools library. See Racket logic programming for an example of such a language. ==Programming environment== The language platform provides a self-hosted IDE named DrRacket, a continuation-based web server, a graphical user interface, and other tools. As a viable scripting tool with libraries like common scripting languages, it can be used for scripting the Unix shell. It can parse command-line arguments and execute external tools. ===DrRacket IDE=== DrRacket (formerly DrScheme) is widely used among introductory computer science courses that teach Scheme or Racket and is lauded for its simplicity and appeal to beginner programmers. The IDE was originally built for use with the TeachScheme! project (now ProgramByDesign), an outreach effort by Northeastern University and a number of affiliated universities for attracting high school students to computer science courses at the college level. The editor provides highlighting for syntax and run-time errors, parenthesis matching, a debugger and an algebraic stepper. Its student-friendly features include support for multiple "language levels" (Beginning Student, Intermediate Student and so on). It also has integrated library support, and sophisticated analysis tools for advanced programmers. Further, module-oriented programming is supported with the module browser, a contour view, integrated testing and coverage measurements, and refactoring support. It provides integrated, context-sensitive access to an extensive hyper-linked help system named "Help Desk". DrRacket is available for Windows, macOS, Unix, and Linux with the X Window System and programs behave similarly on all these platforms. lang racket "Hello, World!" Running this program produces the output: Here is a slightly less trivial program: lang racket (require 2htdp/image) (let sierpinski ([n 8]) (if (zero? n) (triangle 2 'solid 'red) (let ([t (sierpinski (- n 1))]) (freeze (above t (beside t t)))))) This program, taken from the Racket website, draws a Sierpinski triangle, nested to depth 8. Using the #lang directive, a source file can be written in different dialects of Racket. Here is an example of the factorial program in Typed Racket, a statically typed dialect of Racket: lang typed/racket (: fact (Integer -> Integer)) (define (fact n) (if (zero? n) 1 (* n (fact (- n 1))))) ==External links==
References
- ^ "Dialects of Racket and Scheme" . Retrieved 2011-08-15 . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1313362800.0
- ^ "Welcome to Racket" . Retrieved 2019-05-15 . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1557874800.0
- ^ "Overview" . Program by Design. Archived from the original on 2013-05-20 . Retrieved 2011-08-17 . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1313535600.0
- ^ Felleisen, Matthias; Findler, Robert Bruce; Flatt, Matthew; Krishnamurthi, Shriram; Barzilay, Eli; McCarthy, Jay; Tobin-Hochstadt, Sam (2018). "A Programmable Programming Language" . Communications of the ACM . 61 (3): 62– 71. doi : 10.1145/3127323 . S2CID 3887010 . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1795042800.0
- ^ Tobin-Hochstadt, Sam; Gerard, Sage; Dueck, Joel; Flatt, Matthew ; Software Freedom Conservancy ; Chestek, Pamela (2019-11-15). "Completing Racket's relicensing effort" . Retrieved 2019-12-27 . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1577401200.0
- ^ Clements, J.; Flatt, M.; Felleisen, M. (2001). "Modeling an Algebraic Stepper" (PDF) . European Symposium on Programming Languages . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1795042800.0
- ^ Flatt, M. (2002). "Composable and Compilable Macros". International Conference on Functional Programming . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1795042800.0
- ^ "From PLT Scheme to Racket" . Racket-lang.org . Retrieved 2011-08-17 . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1313535600.0
- ^ "DrRacket Files" . Retrieved 21 July 2019 . The standard file extension for a Racket program file is ".rkt". The extensions ".ss", ".scm", and ".sch" are also historically popular. Wikipedia revision 1368585235, retrieved 2026-11-19 · 1795042800.0
- ^ "Racket-on-Chez Status: January 2018" . 2018-01-05. Archived from the original on 2018-06-28 . Retrieved 2018-04-13 . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1523574000.0
- ^ Flatt, Matthew; Derici, Caner; Dybvig, R. Kent; Keep, Andrew W.; Massaccesi, Gustavo E.; Spall, Sarah; Tobin-Hochstadt, Sam; Zeppieri, Jon (2019-07-26). "Rebuilding Racket on Chez Scheme (Experience Report)" . Proceedings of the ACM on Programming Languages . 3 (ICFP): 1– 15. doi : 10.1145/3341642 . ISSN 2475-1421 . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1795042800.0
- ^ "Racket 7.5 release" . Packt Hub . 22 November 2019 . Retrieved 2019-11-28 . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1574895600.0
- ^ "Racket v7.5" . Racket | Blog . Retrieved 2019-11-28 . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1574895600.0
- ^ "Racket v8.0" . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1795042800.0
- ^ Strickland, T.S.; Fellesisen, Matthias (2010). "DLS 2010: Contracts for First-Class Classes" (PDF) . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1795042800.0
- ^ "PLT Scheme version 4.0" . 2008-06-12. Archived from the original on 2013-02-02 . Retrieved 2012-08-07 . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1344294000.0
- ^ "Contracts" . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1795042800.0
- ^ "Threads" . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1795042800.0
- ^ "Futures" . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1795042800.0
- ^ "Places" . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1795042800.0
- ^ Findler, R. B.; Felleisen, M. (2002). "Contracts for Higher-Order Functions" (PDF) . International Conference on Functional Programming . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1795042800.0
- ^ "The Racket package system and Planet" . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1795042800.0
- ^ Flatt, Culpepper, Darais, Findler, Macros that Work Together; Compile-Time Bindings, Partial Expansion, and Definition Contexts Wikipedia revision 1368585235, retrieved 2026-11-19 · 1795042800.0
- ^ "Racket 5.2" . PLT, Inc. 2011-11-09 . Retrieved 2012-06-16 . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1339801200.0
- ^ "Racket 5.3" . PLT, Inc. 2012-08-07 . Retrieved 2012-08-07 . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1344294000.0
- ^ "Racket 5.3.1" . PLT, Inc. 2012-11-07 . Retrieved 2012-11-07 . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1352242800.0
- ^ Tobin-Hochstadt, S.; Felleisen, M. (2008). "The Design and Implementation of Typed Scheme". Principles of Programming Languages . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1795042800.0
- ^ Barzilay, E.; Clements, J. (2005). "Laziness Without All the Hard Work: Combining Lazy and Strict Languages for Teaching". Functional and Declarative Programming in Education . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1795042800.0
- ^ Flatt, M.; Barzilay, E.; Findler, R. B. (2009). "Scribble: Closing the Book on Ad Hoc Documentation Tools". International Conference on Functional Programming . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1795042800.0
- ^ Findler, R. B.; Flatt, M. (2004). "Slideshow: Functional Presentations". International Conference on Functional Programming . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1795042800.0
- ^ Felleisen, M.; Findler, R. B.; Flatt, M.; Krishnamurthi, S. (2004). "The Structure and Interpretation of the Computer Science Curriculum" (PDF) . Journal of Functional Programming . 14 (4): 365– 378. doi : 10.1017/S0956796804005076 . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1795042800.0
- ^ "Planet2 questions" . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1795042800.0
- ^ "Racket 6.0" . PLT, Inc. 2014-02-26 . Retrieved 2016-02-23 . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1456182000.0
- ^ Implementations Wikipedia revision 1368585235, retrieved 2026-11-19 · 1795042800.0
- ^ RacketScript Wikipedia revision 1368585235, retrieved 2026-11-19 · 1795042800.0
- ^ Pycket Wikipedia revision 1368585235, retrieved 2026-11-19 · 1795042800.0
- ^ "Functional mzScheme DSLs in Game Development" . Retrieved 2012-05-08 . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1336431600.0
- ^ "Bootstrap" . bootstrapworld.org . Retrieved 2015-08-11 . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1439247600.0
- ^ "Rust Bibliography" . GitHub . 23 November 2022. Wikipedia revision 1368585235, retrieved 2026-11-19 · 1795042800.0
- ^ "The Hackett Programming Language" . Alexis King's Blog . Retrieved 16 June 2019 . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1795042800.0
- ^ "Programming and Programming Languages" . Index of / . 20 September 2017 . Retrieved 16 June 2019 . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1795042800.0
- ^ The Pyret Crew (24 May 2011). "The Pyret Code; or A Rationale for the Pyret Programming Language" . Pyret . Retrieved 16 June 2019 . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1795042800.0
- ^ Flatt, Matthew (2012). "Creating Languages in Racket" . Communications of the ACM . Retrieved 2012-04-08 . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1333839600.0
- ^ a b c Findler; Clements; Flanagan; Flatt; Krishnamurthi; Steckler; Felleisen (2001). "DrScheme: A Programming Environment for Scheme" (PDF) . Journal of Functional Programming . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1795042800.0
- ^ Barzilay, E.; Orlovsky, D. (2004). "Foreign Interface for PLT Scheme" (PDF) . Scheme and Functional Programming . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1795042800.0
- ^ Felleisen, M.; Findler, R. B.; Flatt, M.; Krishnamurthi, S. (2009). "A Functional I/O System (or Fun for Freshman Kids)" (PDF) . International Conference on Functional Programming . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1795042800.0
- ^ a b c "Rebuilding Racket's Graphics Layer" . 2010-12-08 . Retrieved 2017-12-11 . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1512946800.0
- ^ Flatt, M.; Yu, G.; Findler, R. B.; Felleisen, M. (2007). "Adding Delimited and Composable Control to a Production Programming Environment" (PDF) . International Conference on Functional Programming . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1795042800.0
- ^ a b c d Tobin-Hochstadt, S.; St-Amour, V.; Culpepper, R.; Flatt, M.; Felleisen, M. (2011). "Languages as Libraries" (PDF) . Programming Language Design and Implementation . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1795042800.0
- ^ Benson, Brent W. Jr. (26–28 October 1994). "libscheme: Scheme as a C Library" . Proceedings of the USENIX Symposium on Very High Level Languages . Berkeley, CA: USENIX Association. pp. 7– 19. ISBN 978-1880446652 . Retrieved 7 July 2013 . {{ cite conference }} : More than one of |location= and |publication-place= specified ( help ) Wikipedia revision 1368585235, retrieved 2026-11-19 · 1795042800.0
- ^ a b Felleisen, M.; Findler, R.B.; Flatt, M.; Krishnamurthi, S.; Barzilay, E.; McCarthy, J.; Tobin-Hochstadt, S. (2015). "The Racket Manifesto" (PDF) . Proceedings of the First Summit on Advances in Programming Languages : 113– 128. Wikipedia revision 1368585235, retrieved 2026-11-19 · 1795042800.0
- ^ a b Flatt; Findler; Krishnamurthi; Felleisen (1999). Programming Languages as Operating Systems (or, Revenge of the Son of the Lisp Machine) . International Conference on Functional Programming. Wikipedia revision 1368585235, retrieved 2026-11-19 · 1795042800.0
- ^ a b "Parser Tools: lex and yacc-style Parsing" . Retrieved 2011-08-16 . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1313449200.0
- ^ Matthews, J. (2006). "Component Deployment with PLaneT: You Want it Where?". Scheme and Functional Programming Workshop . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1795042800.0
- ^ Sperber, Michael; Dybvig, R. Kent; Flatt, Matthew; Van Straaten, Anton; et al. (August 2007). "Revised 6 Report on the Algorithmic Language Scheme (R6RS)" . Scheme Steering Committee . Retrieved 2011-09-13 . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1315868400.0
- ^ "Racket: Software License" . Retrieved 2015-10-20 . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1445295600.0
- ^ "Team" . Racket . Retrieved April 25, 2026 . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1795042800.0
- ^ a b c "Racket Core Release Notes" . Archived from the original on 2013-07-05 . Retrieved 2012-04-15 . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1334444400.0
- ^ a b c Flatt, M.; Findler, R. B.; Felleisen, M. (2006). "Scheme with Classes, Mixins, and Traits" (PDF) . Asian Symposium on Programming Languages and Systems . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1795042800.0
- ^ "Submodules" . 2012-06-03 . Retrieved 2012-08-07 . Wikipedia revision 1368585235, retrieved 2026-11-19 · 1344294000.0
Cite this
"Racket (programming language)". 1786311956. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1368585235