A rough sketch of a book. Very rough.
-
ADT and GC in Forth. A few simple apps.
-
Frames. Parser and printer.
-
Parser and printer for s-exprs.
-
Simple interpreters, in Forth.
Just function definition (LAMBDA) and application.
Define bools using functions, numbers using Church numerals.
Lexical and dynamic scoping, hyperstatic etc.
-
Add true bools and numbers, QUOTE, IF, SET! and global variables.
Add the macro hook, DEFINE and DEFINE-MACRO.
Add a few derived features, like LET.
-
Macro writing macros. BACKQUOTE and SETF.
-
Tail recursion.
Continuations (CPS transformation) and multiple values.
-
Multitasking using continuations.
-
Pattern matching and a rule based language.
-
Lazy evaluation. DELAY and FORCE.
-
Backtracking and a simple logic based language.
-
Simple compiler for primitive syntax, without continuations.
Compile to threaded code.
I doubt I'll ever write it, of course.
I'd rather write code than write about code.