History, Standards and Best Practices
52.1 History and Standards
Scheme created by Steele and Sussman (MIT AI Memo 349) The Lambda Papers Revised Report on Scheme (R1RS) SICP published; R2RS R4RS (IEEE Scheme standard 1990/1991)
R5RS: syntax-rules, dynamic-wind, multiple values, eval SRFI process begins
R6RS: libraries, records, exceptions/conditions, Unicode, syntax-case, bytevectors (controversial: large)
R7RS-small: returns to minimalism with libraries, records, exceptions, parameters, bytevectors Chez Scheme open-sourced by Cisco
Racket moves to a Chez-based backend (Racket CS) R7RS-large editions (Red, Tangerine,...), Hoot (Guile → Wasm), Guile 3 JIT, Gerbil v0.18+
52.2 Best Practices
✅ Write small procedures with clear names and conventions (predicate?, mutate!, a->b).
✅ Prefer recursion and higher-order procedures over mutation. Isolate state behind closures or records.
✅ Use named let for loops, and keep recursive calls in tail position when the input can be large.
✅ Use define-record-type instead of ad hoc lists for structured data.
✅ Use syntax-rules macros sparingly and only for syntax that procedures can't express.
✅ Use R7RS libraries and cond-expand for portability. Rely on SRFIs for common needs.
✅ Test with SRFI-64 (or your implementation's framework) and develop interactively at the REPL.
✅ Indent consistently and use structural editing (paredit).
❌ Mutating quoted literals ((set-car! '(1 2)...)) ❌ Assuming argument evaluation order (it's unspecified)
❌ Using eq? on numbers or strings (use eqv?, =, string=?, equal?)
❌ Repeated append in loops (quadratic time) ❌ Overusing call/cc where simpler control (early return via escape, exceptions) suffices
❌ Non-portable assumptions without cond-expand when targeting several implementations