CLU reference manual
Iterators: signs of weakness in object-oriented languages
ACM SIGPLAN OOPS Messenger
A first report on the A# compiler
ISSAC '94 Proceedings of the international symposium on Symbolic and algebraic computation
Iteration abstraction in Sather
ACM Transactions on Programming Languages and Systems (TOPLAS)
ACM Transactions on Programming Languages and Systems (TOPLAS)
Programming Ruby: the pragmatic programmer's guide
Programming Ruby: the pragmatic programmer's guide
Abstraction and verification in Alphard: defining and specifying iteration and generators
Communications of the ACM
STL tutorial and reference guide, second edition: C++ programming with the standard template library
STL tutorial and reference guide, second edition: C++ programming with the standard template library
Hi-index | 0.00 |
Software libraries rely increasingly on iterators to provide generic traversal of data structures. These iterators can be represented either as objects that maintain state or as programs that suspend and resume control. This paper addresses two problems that remain in the use of iterators today: The first problem is that iterators represented as state-saving objects in languages such as C++ or Java typically have logic that is much more complicated than control-based iterators. This paper presents a program structuring technique that allows object-based iterators to be implemented with the same clarity as control-based iterators. The second problem is that the usual implementations of control-based iterators are not sufficiently efficient for high-performance applications. This paper presents a code optimization technique that can be applied to control-based iteration to produce efficient natural loops at the machine code level. Combined, these two results allow iterators for complex data structures to be easily written and efficiently implemented.