Search Results

Search found 1 results on 1 pages for 'lchi'.

Page 1/1 | 1 

  • Is using the break statement bad practice?

    - by Lchi
    I've been told by professors and peers at my university that using the break statement is bad practice, but through my coursework haven't come up with a great reason why. Those who claim that it is bad say that it's a "get out of jail free card" and that you can always avoid using it. My guesses for why its considered bad would be that you could possibly skip some cleanup code after the break, or similarly exit some control structure in an inconsistent state. Is there any reason why using break is(n't) bad practice?

    Read the article

1