Change do {} while(true) to while(true) {}
See original GitHub issueThese loops in CFR output
do {
...
} while(true);
should be changed to
while(true) {
...
}
A do while loop insists that the condition is at the end and when I encounter a loop the first thing I want to know is what the condition is. Thus, I am forced to look for the end of the code block of the loop just to find out it is an infinite loop. In conclusion, changing those loops to while loops will improve readability.
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (8 by maintainers)
Top Results From Across the Web
Python While Loop | While True and While Else in Python
The while loop in python is a way to run a code block until the condition returns true repeatedly. Unlike the "for" loop...
Read more >How to use while True in Python - GeeksforGeeks
In this article, we will discuss how to use while True in Python. While loop is used to execute a block of code...
Read more >What does "while True" mean in Python? - Stack Overflow
while True means loop forever. The while statement takes an expression and executes the loop body while the expression evaluates to ...
Read more >While Loops in Python – While True Loop Statement Example
Essentially, a while True loop is a loop that is continuously True and therefore runs endlessly. It will never stop until you force...
Read more >Java do while loop | DigitalOcean
We can create an infinite loop by passing boolean expression as true in the do while loop. Here is a simple do while...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
its inevitable, CFR will have to be hostile-forked now
I got a better one 😉