Racket is this section’s control case. Every other folder here answers the generics question with a static type system of some kind, so it is worth having one language that solves the same problems without one. Parametric polymorphism arrives through contracts checked at runtime, specialization arrives through macros that generate the code a template would have generated, and parameterized components arrive through units rather than type parameters. The claim underneath all of it is that you build a language rather than a library, which reframes what the other folders are trading against.
Read the core layer first. The macro system, the module system, and the typed layer all assume you know what a syntax object is and what the expander does with it.
The core: reading, expanding, evaluating
- S-Expressions and Evaluation in Racket - the reader and expander as two separate layers, and why
read-syntaxproduces something richer than a list - Racket: From Core to Surface - desugaring a rich surface syntax into a small core with precise semantics
- Structs and Pattern Matching in Racket - what
structbinds, why opacity is the default, and how generativity bites
Polymorphism without a type checker
The folder’s answer to the section’s question, built out of runtime boundaries instead of static ones.
- Contracts and Blame in Racket - a boundary rather than an assertion, and the flat, chaperone, impersonator hierarchy underneath
- Parametric Polymorphism Through Contracts - an opaque wrapper enforcing at runtime a stronger claim than a type parameter makes
- Generic Interfaces and the gen Prefix - a method table riding on a structure type property, dispatched by argument name
- racket/generic in Practice, Fallbacks and Dispatch - the four places a generic call can land, and implemented against merely supported
Typed Racket, where the types do show up
- Typed Racket and Gradual Typing - runtime enforcement is what separates this from an optional checker
- Occurrence Typing - a predicate whose type carries a logical proposition, and what breaks the narrowing
- Polymorphic Types in Typed Racket -
All, the kind distinction between a type and a type constructor, and where inference gives up - Typed-Untyped Boundaries and Contract Generation - compiling a type into a contract, deciding blame, and the types that cannot be translated
Macros as the specialization mechanism
Where a C++ template generates code, Racket writes the generator by hand and the language gives it a real theory.
- Hygienic Macros and syntax-rules in Racket - pattern variables, ellipses, and hygiene as an outcome rather than a rule
- Syntax Objects and Lexical Context - a datum plus a scope set plus a source location, carried together
- syntax-parse and Specification-Driven Macros - syntax classes as named grammar productions, and macros written as specifications
- Macro Expansion Order and Partial Expansion - the expander as a small-step machine, and
local-expand’s stop list - Compile-Time Computation and begin-for-syntax - phase levels as separate instantiations, and what that buys over running code early
Modules and the language tower
- The Module System and require/provide in Racket - a static binding structure the compiler can trust, not a runtime table of names
- Units and Signatures in Racket - first-class parameterized components, and the mutual dependency modules cannot express
- Languages as Modules and #lang - what a
#langline resolves to, and the two-location lookup behind it - Reader Extension and Custom Syntax in Racket - notation that is not s-expressions at all, inside a Racket program
Control
- Proper Tail Calls and the Loop Question - no loop primitive, and no such thing as stack overflow
- Continuations and call/cc in Racket - what
call/cccaptures, and escaping once against re-entering a saved future - Delimited Continuations and Prompts - prompt tags, abort semantics, and the single rule separating
shiftfromcontrol - Parameters and Dynamic Binding - continuation marks over thread cells, and when dynamic scope is the right answer
Data, numbers, and the runtime
- The Numeric Tower - exactness as a property orthogonal to the numeric hierarchy, and the contagion rules
- Immutable Data and Persistent Structures - structural sharing, and the cost model that makes log N read as constant
- Futures, Places, and Real Parallelism - why a future stops the moment it needs its continuation
- The Racket Runtime on Chez - what changed when the C core was swapped out, and why the expander was never part of the port
Read from the comparative layer
- Generics, Monomorphization vs Erasure - the axis Racket sits off of entirely
- constexpr and Compile-Time Computation - the other compile-time computation story
- Protocols and Structural Subtyping - dispatch without inheritance, done another way
- Module Systems and Namespacing - a static module structure against textual inclusion and path search
Any pages placed under this folder are auto-listed below by Quartz.