Racket (programming language): Difference between revisions

Content deleted Content added
m brackets fixed
Line 61:
 
===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 (programming language)|Scheme]]. [[Matthew Flatt]] cobbled together MrEd, the original [[virtual machine]] for Racket, from libscheme,<ref name="libscheme">{{cite conference |url=https://www.usenix.org/legacy/publications/library/proceedings/vhll/benson.html |title=libscheme: Scheme as a C Library |last=Benson |first=Brent W. Jr. |date=26–28 October 1994 |publisher=USENIX Association |publication-place=Berkeley, CA |book-title=Proceedings of the USENIX Symposium on Very High Level Languages |pages=7–19 |___location=Santa Fe, NM |isbn=978-1880446652 |access-date=7 July 2013}}</ref> [[wxWidgets]], and a few other free systems.<ref name="gui-rebuild">{{cite web |title=Rebuilding Racket's Graphics Layer |access-date=2017-12-11|date=2010-12-08 |url=http://blog.racket-lang.org/2010/12/rebuilding-rackets-graphics-layer.html}}</ref> In the years that followed, a team including Flatt, [[Robert Bruce Findler|Robby Findler]], [[Shriram Krishnamurthi]], Cormac Flanagan, and many others produced DrScheme, a programming environment for novice Scheme programmers and a research environment for [[type system#Combining static and dynamic type checking|gradual typing]].<ref name="drscheme">{{cite journal |title=DrScheme: A Programming Environment for Scheme|journal=Journal of Functional Programming |last1=Findler |last2=Clements |last3=Flanagan |last4=Flatt |last5=Krishnamurthi |last6=Steckler |last7=Felleisen |url=http://www.ccs.neu.edu/racket/pubs/jfp01-fcffksf.pdf |year=2001}}</ref> 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.
Line 109:
{{See also|Racket features#Language Extensions|l1=Racket language extensions}}
 
The features that most clearly distinguish Racket from other languages in the Lisp family are its integrated language [[Extensible programming|extensibility]] features that support building new [[Domain-specific languages|___domain-specific]] and [[General-purpose programming language|general-purpose]] languages. Racket's extensibility features are built into the module system to allow context-sensitive and module-level control over syntax.<ref name='"languages-as-libraries'"/> For example, the <code>#%app</code> syntactic form can be overridden to change the semantics of [[function application]]. Similarly, the <code>#%module-begin</code> form allows arbitrary static analysis of the entire module.<ref name='"languages-as-libraries'"/> Since any module can be used as a language, via the <code>#lang</code> 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 (programming language)|Scheme]]-like hygienic macro system, which provides more features than [[Lisp (programming language)|Lisp's]] s-expression manipulation system,<ref name='"you-want-it-when'">{{cite conference |last=Flatt |first=Matthew |url=http://www.cs.utah.edu/plt/publications/macromod.pdf |title=Composable and Compilable Macros, You Want it When? |book-title=International Conference on Functional Programming |year=2002}}</ref><ref>Flatt, Culpepper, Darais, Findler, [http://www.cs.utah.edu/plt/publications/jfp12-draft-fcdf.pdf Macros that Work Together; Compile-Time Bindings, Partial Expansion, and Definition Contexts]</ref> Scheme 84's [[Hygienic macro|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 language]]s 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 [[dialect (computing)|dialects]]. This includes Typed Racket, which is a gradually typed dialect of Racket that eases the migration from [[dynamically typed|untyped]] to typed code,<ref>{{cite conference |last1=Tobin-Hochstadt |first1=S. |last2=Felleisen |first2=M. |title=The Design and Implementation of Typed Scheme |book-title=Principles of Programming Languages |year=2008}}</ref> Lazy Racket—a dialect with [[lazy evaluation]],<ref>{{cite conference |last1=Barzilay |first1=E. |last2=Clements |first2=J. |title=Laziness Without All the Hard Work: Combining Lazy and Strict Languages for Teaching |book-title=Functional and Declarative Programming in Education |year=2005}}</ref> and Hackett, which combines Haskell and Racket.<ref name="Alexis Kings Blog">{{cite web | title=The Hackett Programming Language | website=Alexis King's Blog | url=https://lexi-lambda.github.io/hackett/ | access-date=16 June 2019}}</ref> The pedagogical programming language [[Pyret]] was originally implemented in Racket.<ref name="The Pyret Crew 2011">{{cite web | author=The Pyret Crew | title=The Pyret Code; or A Rationale for the Pyret Programming Language | website=Pyret | date=24 May 2011 | url=http://pyret.org/pyret-code/index.html | access-date=16 June 2019}}</ref><ref name="Index of / 2017">{{cite web | title=Programming and Programming Languages | website=Index of / | date=20 September 2017 | url=https://papl.cs.brown.edu/2017/ | access-date=16 June 2019}}</ref>