4 ms·
> I've seen "loop" in other languages. But Qt calls it "forever", and that is indeed very pretty. Very Qt, even You can break a "forever" loop so I think "loop
by teruakohatu 2y ago
> I've seen "loop" in other languages. But Qt calls it "forever", and that is indeed very pretty. Very Qt, even
You can break a "forever" loop so I think "loop" is a better name.
- wwalexander 2y agoI don’t know why “repeat” isn’t very common in place of while/loop/etc; it works out nicely grammatically. repeat {} repeat while <condition> {} repeat {} while <condition> repeat <count> {}
- af78 2y agoOne possible reason: > The word "REPEAT" should not be used in place of "SAY AGAIN", especially in the vicinity of naval or other firing ranges, as "REPEAT" is an artillery proword defined in ACP 125 U.S. Supp-2(A) with the wholly different meaning of "request for the same volume of fire to be fired again with or without corrections or changes" (e.g., at the same coordinates as the previous round). https://en.wikipedia.org/wiki/Procedure_word#Say_again https://en.wikipedia.org/wiki/Procedure_word#Say_again More seriously, PASCAL has repeat-until loops, similar to do-while loops in C.
- aartaka 2y agoPretty C does aliases "repeat" for "do", so yeah, I've got you covered!
- krylon 2y ago"indefinitely" might be a better name. (But I think loop is indeed a better name.)
- aartaka 2y ago"loop" added in commit 626408b, thank you!