3 ms·
The control flow for repetition is in fact called "repeat" in some languages. I don't think the word "loop" stuck around because the metaphor of paper tapes is
by eridius 10y ago
The control flow for repetition is in fact called "repeat" in some languages. I don't think the word "loop" stuck around because the metaphor of paper tapes is particularly compelling (especially since we stopped using those a long time ago), I think it stuck around because it's a good short word that means the right thing. And, for example, it's pretty awkward to say something like "a for repeat", but "a for loop" is nice and simple. We probably would have ended up on this word even without paper tapes.
- xapata 10y agoMaybe, but the combination of "loop" and "break" makes a lot more sense if you imagine physically breaking a loop of paper.