>I don't see it as a special case. As far as I'm concerned, it's not a >foreach loop at all rather than a special case of foreach loops. > - It performs a different function than foreach loops. > - It's implemented differently than C-style loops and foreach loops. > - It performs differently than foreach loops. >You lump it in as a foreach loop, so either you are unaware of the above, >or you *do* see it as a special case of foreach loops. >People are quite aware of the difference. They avoid it like the plague (in >favour of C-style loops) until they learn it's not a foreach loop. But when >it comes time to discussing "for" vs "foreach", it's automatically just a >special case of foreach loops. I just find that weird. Eric, you're coming at from the point of view of thinking about internal op codes and how it gets implemented. You're not thinking of it from the end-user point of view, for whom the semantics is what counts. That it gets optimized into something very different internally does not change its semantics, and therefore is not a special case to the user. --tomThread Previous