Abstract
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.
- ABELSON, H., SUSSMAN, G. J., AND SUSSMAN, J. 1985. Structure and Interpretation of Computer Programs. MIT Press, Cambridge, Mass. Google Scholar
- ELLIS, iV{. A. AND STROUSTRUP, B. 1990. The Annotated C-l--l- Reference Manual. Addison-Wesley, Reading, Mass. Google Scholar
- GOLDBERG, A. AND ROBSON, D. 1985. Smalltalk-80, The Language and its Implementation. Addison-Wesley, Reading, Mass. Google Scholar
- Goos, G. 1994. Sather-K. Tech. Rep. 8/94, Faculty of Computer Science, University of Karlsruhe, Karlsruhe, Germany.Google Scholar
- HEWITT, C. 1977. Viewing control structures as patterns of passing messages. Artif. Intell. 8, 323-364.Google Scholar
- HOARE, C. A. R. 1985. Communicating Sequential Processes. Prentice-Hall, Englewood Cliffs, N.J. Google Scholar
- LISKOV, B. AND GUTTAG, J. 1986. Abstraction and Specification in Program Development. MIT Press, Cambridge, Mass. Google Scholar
- MARLIN, C. D. 1980. Coroutines: A Programming Methodology, a Language Design, and an Implementation. Springer-Verlag, Berlin, Germany. Google Scholar
- MCDERMOTT, D. V. AND SUSSMAN, G. J. 1974. The Conniver reference manual. Tech. Rep. Artificial Intelligence Memo 259a, MIT, Cambridge, Mass.Google Scholar
- MEYER, B. 1988. Object-Oriented Software Construction. Prentice-Hall, Englewood Cliffs, N.J. Google Scholar
- iV{URER, S., FELDMAN, J. A., ElM, C.-C., AND SEIDEL, M.-M. 1993. pSather: Layered extensions to an object-oriented language for efficient parallel computation. Tech. Rep. TR-93-028, International Computer Science Institute, Berkeley, Calif.Google Scholar
- NEWELL, t. AND TONGE, F. iV{. 1960. An introduction to Information Processing Language V. Tech. Rep. Paper P-1929, The RAND Corp., Los Angeles, Calif. Presented at the ACM National Conference, Boston, 1959.Google Scholar
- OMOHUNDRO, S. AND LIM, C.-C. 1992. The Sather language and libraries. Tech. Rep. TR-92-017, International Computer Science Institute, Berkeley, Calif.Google Scholar
- STEELE, JR., G. L. 1990. Common LISP, The Language, 2nd ed. Digital Press, Bedford, Mass. Google Scholar
- STOUTAMIRE, D. AND OMOHUNDRO, S. 1995. Sather 1.1. Tech. rep., International Computer Science Institute, Berkeley, Calif. Available at http://www.icsi, berkeley.edu/Sather.Google Scholar
- SUSSMAN, G. J. AND STEELE, JR., G. L. 1975. Scheme: An interpreter for extended lambda calculus. Tech. Rep. Artificial Intelligence Memo 349, MIT, Cambridge, Mass. Google Scholar
- SZYPERSKI, C. A. 1992. Insight ETHOS: On Object-Orientation in Operating Systems. Informatik- Dissertationen ETH Ziirich. Vol. 40. Verlag der Fachvereine, Zurich, Switzerland.Google Scholar
- WIRTH, N. 1983. Programming in Modula-2. Springer, Berlin, Germany. Google Scholar
- WIRTH~ N. AND GUTKNECHT~ J. 1992. Project Oberon--The Design of an Operating System and Compiler. Addison-Wesley, Reading, Mass. Google Scholar
Index Terms
- Iteration abstraction in Sather
Recommendations
Abstraction the key to CS1
It is commonly agreed that a first-year programming class should not so much be a class in programming as a class in problem solving. In this paper we argue that problem solving is better taught using the object-oriented paradigm than the traditional ...
Comments