The Essence of the Iterator Pattern, by Gibbons and Oliveira.
This paper develops a precise model for internal iteration of a data structure, such that exactly the necessary information is exposed and no more.
It's a fantastic exploration of improving a well-known design space with justified removal of details. I keep its lessons in mind whenever I am facing code that seems to have a lot of incidental complexity.
This paper develops a precise model for internal iteration of a data structure, such that exactly the necessary information is exposed and no more.
It's a fantastic exploration of improving a well-known design space with justified removal of details. I keep its lessons in mind whenever I am facing code that seems to have a lot of incidental complexity.
https://www.cs.ox.ac.uk/jeremy.gibbons/publications/iterator...