Quote Originally Posted by pdk5 View Post
For loops are preferred , but "breaks" are also not preferred much i guess.
It really depends. Just make sure your loops are not too convoluted. *Personally*, I hate having variables such as "done" or "found". It bloats the code with later tests. I think a good break, return or (sometimes) even goto can be more expressive, as it reduces the amount of later conditional tests. But to each their own. The real goal is to break down your code into simple blocks until there simply is no complexity left.

Don't let anyone (including me) tell you that something is "bad" or "good" without backing and explaining why, and make sure you build your own opinion.

That said, when in Rome, do as the Romans, and if you have a style guide that says "don't use breaks", then by all means, don't use break.