As programmers, the idea of language-oriented programming may be new. But we’ve been using special-purpose languages—known as domain-specific languages (aka DSLs)—for a long time.
What qualifies as a DSL? A notational system for certain data, or operations on data, tailored to the needs of a particular set of problems.
Even if the terminology is new, DSLs are established in programming practice. For the details, see Why Language-Oriented Programming? Why Racket?
When first presented with the idea of a DSL, a contrarian colleague will likely interject: “Use a DSL? We’ve never done that before.”
The response: “Of course we have. For instance—”
awk text-processing utility on Unix-like operating systems
bash shell program on Unix-like operating systems
Coq language for proving mathematical theorems
CSS format for storing & relating visual-styling instructions for web pages
HDL a category of languages for modeling hardware components
.htaccess configuration language for Apache web servers
HTML markup language for web documents
Julia language for scientific & technical computing
lex/yacc tools for making tokenizers & parsers
make tool for configuring software builds
MATLAB language for scientific & technical computing
PostScript page-description language
printf embedded language for formatting strings
R language for statistical computing
regular expressions embedded language for matching strings
SQL language for database access and management
TeX high-level page-description language
XML markup language, typically for documents
Temporarily mollified, the contrarian colleague will then say “OK, a DSL is not such a crazy idea. But why should we use Racket to make a DSL? Who’s ever done that?”
The response: “Many have. For instance—”
Anatomy language for generating animal skeletons, especially dinosaurs
bookcover language for generating PDF book covers
brag language for generating parsers from BNF grammars
datalog language for logic programming
Heresy Lisp with BASIC-inspired syntax
Pollen language for making digital books (like this one)
Pyramid Scheme language for creating Ethereum smart contracts (also, best name ever)
Rex alternative syntax for specifying regular languages
Rosette language for creating program verification and synthesis tools
Scribble language for generating Racket documentation
Slideshow language for generating interactive slide presentations
shill scripting language with privilege controls
web-server language for making web applications
If you release a Racket-implemented domain-specific language as a consequence of what you’ve learned in Beautiful Racket, let me know—I’ll be happy to add it to this page.