Sciweavers

ICFP
2005
ACM

The anatomy of a loop: a story of scope and control

14 years 11 months ago
The anatomy of a loop: a story of scope and control
Writing loops with tail-recursive function calls is the equivalent of writing them with goto's. Given that loop packages for Lisp-family languages have been around for over 20 years, it is striking that none have had much success in the Scheme world. I suggest the reason is that Scheme forces us to be precise about the scoping of the various variables introduced by our loop forms, something previous attempts to design ambitious loop forms have not managed to do. I present the design of a loop package for Scheme with a welldefined and natural scoping rule, based on a notion of control dominance that generalizes the standard lexical-scope rule of the calculus. The new construct is powerful, clear, modular and extensible. The loop language is defined in terms of an underlying language for expressing control-flow graphs. This language itself has interesting properties as an intermediate representation. Categories and Subject Descriptors D.3.3 [Programming languages]: Language Constru...
Olin Shivers
Added 13 Dec 2009
Updated 13 Dec 2009
Type Conference
Year 2005
Where ICFP
Authors Olin Shivers
Comments (0)