Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • 2
    Just putting it out there, if/else is also considered a jump. The difference is that it's a jump that can only occur at that specific spot (and it reads a lot easier) and you don't have to worry about the names of the labels (which you don't have to with try/catch either, but comparing to goto). But just saying "it's a jump, which is bad" also says that if/else is bad, when it isn't. Commented Sep 13, 2011 at 17:04
  • 2
    @jsternbarg: Yes, if/else are in factcompiled to jumps at machine level, but at language level, the jump target is the next statement, while in the case of loops, it's the current statement. I would argue, that that's more of a step, than a jump ;) Commented Sep 13, 2011 at 17:46