4 ms·
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
by carlosantelo 14y ago
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