Why is should we give a stuff?



Iterators are ubiquitous


Iterators shape our view of the world


Java Iterators - iterators in general - are everywhere. I've done no analysis, but it's not unreasonable to suggest that they are one of the most widely used library classes, outside java.lang. We write the kind of for loops we've just looked at all the time.

Because we use them all the time, they are a big part of how we use Java. They help form our notion of how Java works, and what a Java program is.

The Sapir-Whorf hypothesis argues that the nature of a language influences habitual thought by its speakers. Different patterns of language yield different patterns of thought. Sapir and Whorf were linguists, active in the early part of the 20th century, and so they were taking about human speech and language. While their hypothesis is widely considered to be true (or rather not false), there's debate about how true it is, how strongly it applies. I think it also applies to programming languages, and I suspect you do too. I think it might actually apply more strongly, because programming languages have a restricted application and vocabulary. We know different languages have different idioms. Remember Dave Thomas and his "more natural". People say something is Perlish, or Pythonic. Those of you who've worked with Lisp or Scheme after working with Java/C++/etc, how strange it initially felt, and then suddenly how everything could be solved with a quick bit of tail recursion.

I'm not taking a limited view of programming languages here, referring only to keywords and syntax, but to the language, it's standard and common libraries, the language ecosystem if you like.