News for hackers. Stuff that matters.
Re:Exceptions for control flow considered perfectly acceptable by carlosantelo on Tuesday March 05, 2013 @08:27AM (#5324311)
Exceptions break normal encapsulation mechanisms but as long as you code is exception safe, nobody cares, it's just that exceptions are the new goto, and nobody likes goto.

However they are only few good reasons to use goto, and exceptions for control flow should be treated the same.

Therefore the point we should make against exceptions for control flow is not exceptions are for exceptional circunstances but; as a rule of thumb exceptions are for errors. And indeed they help a lot in not obscuring normal program logic, we allready have other tools for control flow.

Nobody likes goto (and my bad english)

bye

There are no comments on this comment yet.