Namespaces
Variants
Actions

Talk:intro/control/for

From cppreference.com

Move range-for to advanced section

I think it's worth to move the range-for item to the "advanced" (whatever we name it in the future) section of the book once we have an article for "for" loop there. If one reads the introduction sequentially, he won't know anything about either auto or containers, so it's worth not to confuse the reader. We could add a link to the extended description so that one at least knows that the range-for loop exists, even if he does not understand it yet. --P12 11:05, 15 September 2013 (PDT)

Yeah, cutting range-for is probably a good idea. There could be a passing mention when containers and arrays are introduced, but it doesn't makes sense to have it here. But auto seems pretty fundamental to 21st century C++ (I actually seriously considered putting all the for(int i = 0;...) in terms of for(auto i = 0;...), and we probably still should) - maybe it should be introduced with variables. --Indi (talk) 10:13, 16 September 2013 (PDT)