My first programming language was FORTRAN IV. As I recall we had Do loops. They worked pretty much the same as what we call For loops in most languages today. We didn’t have while loops but we did the same sorts of things with line numbers, if statements, and the powerful but “evil” Go To statement. As time went on I learned more ways of specifying looping constructs including recursion. Recursion took me some time to wrap my head around. Possibly because I used some languages that didn’t even support it back in the day.
These days there are all sorts of iteration loops of various complexity and power. For a software developer that is wonderful. For a teacher? Well, it means you have to make decisions about what to teach. For a one semester, first programming course I like to keep things simple. A C-family For loop has all sorts of possibilities from the simple to some pretty complex structures. Eventually students will learn many of them but I could probably spend half a quarter just on For loops if I tried to get everything possible in and understood. The cognitive load on some possibilities feels like it would be too much for many students.
Mostly I try to focus on the base concepts. A loop has a set up piece. Variables are set to a known starting state. A loop has some sort of comparison it see if it is finished. A counter it checked, a flag is checked, or maybe an interrupt happens. But something has to stop the loop sometime. usually but we can get into those times when an infinite look is useful later. And of course something has to happen that changes the values or states that the loop is checking.
Understanding these concepts will, I sure hope, prepare students for what ever syntax or iteration style they run into over time.
When we teach students for a career rather than just for a job the concepts are much more important than the programming language or the IDE. Concepts – what a concept!