CPS 343/543 Lecture notes: Tail calls and
Coverage: [EOPL] Chapter 7 (pp. 241-243), §8.1
(pp. 301-308), [TSPL] §§3.2 (pp. 62-70)
and 3.4 (pp. 75-77),
and [TSS] Chapter 19 (pp. 154-177)
Recursive control behavior
|call-by-name||(delay ...)||(force ...)|
|continuations||(call/cc ...)||(k ...)|
problems side-effects cause for call-by-name akin to synchronization
problem for shared memory [PLPP] p. 512
- non-local (abnormal) exits (for exceptional handling)
(i.e., to prevent returning through several layers of recursion)
- breakpoints (as used in debuggers)
- thunks (call-by-name parameters)
- multi-threading and multi-tasking (e.g., co-routines)
- iterators (see [TSS] Chapter 19)
- human-computer dialogs
End of Scheme
- take away: exotic programming languages are powerful (we have
only seen the tip of the iceberg in this class) and poorly understood
- they are an ideal lens through which to study the core concepts
of programming languages (and computer science in general),
- and they can be your claim to fame and fortune, there are too
many success stories to mention (e.g., Viaweb (Paul Graham and Robert
Morris), Orbitz, emacs, and AutoCAD are just some)
||D.P. Friedman, M. Wand, and C.T. Haynes.
Essentials of Programming Languages.
MIT Press, Second edition, 2001.
Programming Languages: Principles and Practice.
Brooks/Cole, Pacific Grove, CA, Second edition, 2002.
||D.P. Friedman and M. Felleisen.
The Seasoned Schemer.
MIT Press, Cambridge, MA, 1996.
Multischeme: A Parallel Processing System Based on MIT Scheme.
Ph.D. dissertation, Massachusetts Institute of Technology, 1987.