PROVIDER - a Lisp dialect built for making languages
Racket
Racket evolved from Scheme in 1995 with macros treated as a core capability, so one project can define and load 3 or more custom dialects, backed by DrRacket, Typed Racket and Scribble; it is the Lisp best suited to language design, while ecosystem and hiring remain small.
Detailed Notes
Pros 5 items
Cons 4 items
Service Overview
Racket is a general-purpose language the PLT team derived from Scheme in 1995, renamed from PLT Scheme to Racket in 2010. Its defining idea is language-oriented programming: the language itself ships tools for defining new languages for your problem.
In the languages and frameworks category it is the most engineered member of the functional and Lisp family, with macros, modules, documentation and an IDE all inside the official toolchain.
Key Strengths
- Powerful macros: syntax transformation happens at language level, generating specialised syntax at compile time
- Complete toolchain: DrRacket, Typed Racket, Scribble and raco form a 4-piece set
- Optional typing: untyped and Typed Racket modules coexist in one project
- Teaching ready: built-in teaching languages run from graphical beginners' dialects to full Racket
- Documentation culture: Scribble keeps docs and code in one source, and the reference manual is thorough
Product Ecosystem
Language and tools
The Racket core, Typed Racket, the #lang dialect mechanism, the DrRacket IDE and the raco package manager.
Libraries and frameworks
Web work uses the Racket Web Server and the Frog static site generator, documentation uses Scribble, and research uses the Rosette solver.
Teaching
How to Design Programs and the graded teaching languages form a complete entry path.
Limitations
- Limited ecosystem: third-party libraries are 1 to 2 orders of magnitude fewer than Python or JavaScript
- Syntax friction: parenthesised prefix notation is not intuitive for newcomers
- Unusual deployment: distribution and mainstream cloud integration need adaptation
- Scarce jobs: demand sits almost entirely in teaching, research and language design teams
Use Cases
- Language and DSL design (★★★★★): macros and
#langare the natural tools - Teaching programming languages (★★★★★): teaching languages and course material come complete
- Scripting and prototyping (★★★★): expressive and fast to write
- Web back ends and mobile apps (★★): the ecosystem falls short
Pricing
| Item | Price | Notes |
|---|---|---|
| Racket distribution | $0 | Open source, DrRacket included |
| Packages and libraries | $0 | Installed from the official catalogue via raco pkg |
| Learning material | From $0 | Official books are free online, print copies are extra |
Language, IDE and documentation tools are free; the investment is learning time plus in-house work where the ecosystem is thin.
FAQ
- How does Racket relate to Scheme? Racket grew out of Scheme and added modules, a macro system and tooling, so the two differ in standard and small-step semantics.
- Do you need Lisp experience first? Not necessarily, but prefix notation and recursive thinking reduce the learning curve noticeably.
- Is it production ready? Internal tools and DSLs in small teams fit well; business systems that need broad third-party libraries are better served by mainstream languages. See the alternatives under languages and frameworks.
Code Examples
Defining a custom dialect form
#lang racket
(define-syntax-rule (unless-zero e body ...)
(when (not (zero? e)) body ...))
(define (safe-div a b)
(unless-zero b (/ a b)))
(safe-div 10 2)
define-syntax-rule defines new syntax by pattern matching, and unless-zero is a 1-line plug-in DSL form.
A Typed Racket fragment
#lang typed/racket
(: sum-list : (Listof Number) -> Number)
(define (sum-list xs)
(for/sum ([x xs]) x))
(sum-list '(1 2 3 4))
The : ... annotation declares the function type, checked at compile time and interoperable with untyped modules.
Community & Resources
- Racket: downloads, documentation and examples
- GitHub Racket topic: open packages and projects
- GitHub Lisp topic: the wider Lisp family
- GitHub Scheme topic: Racket's language root
- GitHub Functional Programming topic: practice material