Why is continue inside a loop a bad idea?

unj2 picture unj2 · Feb 6, 2011 · Viewed 9.9k times · Source

Douglas Crockfod says that it is usually better to refactor the continue inside the loop.

Why is continue considered bad within a loop?

Answer

mauris picture mauris · Feb 6, 2011

The use of continue would mean that you have insufficient conditions written in your while.

You should instead use if inside your while loop, or add the condition into the while loop.