23.1 More Rackets

“Racket” is more of an idea about programming languages than a language in the usual sense. Macros can extend a base language (as described in Macros), and alternate parsers can construct an entirely new language from the ground up (as described in Creating Languages).

The #lang line that starts a Racket module declares the base language of the module. By “Racket,” we usually mean #lang followed by the base language racket or racket/base (of which racket is an extension). The Racket distribution provides additional languages, including the following:

Each of these languages is used by starting module with the language name after #lang. For example, this source of this document starts with #lang scribble/base.

Furthermore, Racket users can define their own languages, as discussed in Creating Languages. Typically, a language name maps to its implementation through a module path by adding /lang/reader; for example, the language name scribble/base is expanded to scribble/base/lang/reader, which is the module that implements the surface-syntax parser. Some language names act as language loaders; for example, #lang planet planet-path downloads, installs, and uses a language via PLaneT.