Iteration Abstraction in Sather (zipped postscript, inlined gifs)
Stephan Murer, Stephen Omohundro, David Stoutamire and Clemens Szyperski
Transactions on Programming Languages and Systems.

Sather extends the notion of an iterator in a powerful new way. We argue that iteration abstractions belong in class interfaces on an equal footing with routines. Sather iterators were derived from CLU iterators but are much more flexible and better suited for object-oriented programming. We retain the property that iterators are structured, i.e. strictly bound to a controlling structured statement. We motivate and describe the construct along with several simple examples. We compare it with iteration based on CLU iterators, cursors, riders, streams, series, generators, coroutines, blocks, closures, and lambda expressions. Finally, we describe experiences with iterators in the Sather compiler and libraries.


Last change: 5/30/96
The Sather Team (sather@icsi.berkeley.edu)