Introduction to Scheme
1.1 What is Scheme?
Scheme is a dialect of Lisp created in 1975 at MIT by Guy L. Steele Jr. and Gerald Jay Sussman while studying Carl Hewitt's actor model. It was described in the famous "Lambda Papers" (*Lambda: The Ultimate Imperative*, *Lambda: The Ultimate Declarative*, ...).
Design philosophy (from the report's introduction): *"Programming languages should be designed not by piling feature on top of feature, but by removing the weaknesses and restrictions that make additional features appear necessary."*
1.2 Key Features
Minimal core Small number of special forms; everything else is built from them Lexical scoping
The first Lisp to use lexical scope consistently First-class procedures
Procedures are values, created with lambda Proper tail calls
Guaranteed by the standard: loops can be written as recursion First-class continuations
call/cc captures "the rest of the computation" Hygienic macros
syntax-rules macros can't accidentally capture variables A single namespace for procedures and variables Numeric tower
Exact integers (bignums), rationals, reals, complex; exactness tracking Code is data (s-expressions) Dynamic typing, garbage collection
1.3 Where Scheme Is Used
Education: SICP (MIT 6.001), *How to Design Programs* (Racket's teaching languages), *The Little Schemer*, many university PL courses.
Research: programming language theory, compilers, continuations, macros, type systems.
Software: GNU Guix and GNU Shepherd (Guile), GnuCash, LilyPond (music engraving), GIMP Script-Fu, TeXmacs, GDB (Guile scripting), Chez Scheme (powering Racket CS and Cisco products), and embedded scripting in many applications.
1.4 Scheme vs Other Lisps
Minimal (R7RS-small ~90 pages) Large (1000+ pages) Empty list vs false nil, () truthy