Prelude
1 Overview
Programming in Racket includes programming languages. This latter phrase
means that ordinary programmers have the power to program a language or
many languages, as the need arises—
For decades, the Lisp family of languages has emphasized the idea of language extension as the major tool for adding the linguistic capabilities that a problem-domain demands. Macros for concrete syntax trees are Lisp’s major tool for language extension. Racket has taken this idea to an extreme, and with Racket macros it is not only possible to safely add new linguistic constructive with ease but it is also possible to create entire new languages, embedded or otherwise.
Chapters 2 and 3 motivate idea and provide a model of Lisp-style macros.
Chapters 4 through 6 introduce Racket’s way of programming macro and language extensions.
Chapters 7 and 8 finally show how to create complete languages.
2 Prerequisites
defining and using functions, including higher-order functions, plus the lexical scope that makes thinking about such functional programming possible;
lists, s-expressions and the various ways of creating them: cons, list, quote, quasiquote, and unquote;
structs for the introduction of user-defined structures and struct properties;
match, the powerful construct for pattern matching structured values such as lists and trees of structs against patterns;
comprehensions, especially for/list and its friend for*/list;
awareness of the contract system and its notion of blame assignment;
a tiny bit of "racket/gui", the graphical user interface library.