Timeline for How to compute cyclomatic complexity for empty whiles and if + breaks?
Current License: CC BY-SA 3.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 23, 2023 at 11:53 | comment | added | gnasher729 | And for(;;) with internal break or continue is exactly what you want if you don’t know whether to break or continue at the start of the loop. | |
Mar 23, 2023 at 11:49 | comment | added | gnasher729 | I recommend for(;;) for loops with an exit condition inside the loop. That’s the idiomatic way to write it. | |
Mar 19, 2018 at 5:26 | vote | accept | Alexei | ||
Mar 3, 2018 at 18:03 | comment | added | Alexei |
I rarely use while(true) and here I used it just as an example. So, the second form will significantly increase the complexity. I agree with break usage and I rarely use it.
|
|
Mar 3, 2018 at 17:24 | history | answered | user1118321 | CC BY-SA 3.0 |