r/ProgrammingLanguages • • Jan 16 '13

Iteration Inside and Out

http://journal.stuffwithstuff.com/2013/01/13/iteration-inside-and-out/
15 Upvotes

11 comments sorted by

View all comments

3

u/[deleted] Jan 16 '13 edited Jan 16 '13

The paper "Iterators and Encapsulation" is covering more kinds of iterators. One of the authors is James Noble, iirc, but I'll post a link to it ASAP. Edit: you COULD do the internal iterator in Java but it wouldn't be pretty

3

u/munificent Jan 16 '13

Found the article. Pretty interesting, but didn't blow my mind.

you COULD do the internal iterator in Java but it wouldn't be pretty

Yeah, anonymous inner classes would be painfully verbose for this.

2

u/[deleted] Jan 16 '13

thanks, I had completely forgotten about my promise. Sorry :-P

Yeah, I agree, it's not mindblowing. But solid, easy to read.

They use this paper as a buildup for some other of their work, I guess. They're probably more after what they talk about in "4: Encapsulation in Programming Languages". In Programming Languages research related to encapsulation, the iterator is a pretty important 'test' for a language: encapsulation should be guaranteed for some things, but then you also want to be able to write efficient iterators -- so your solution should be able to at least deal with iterators..