3 ms·
I don't really agree there. Exceptions can only break out. They're a moderately stronger form of return. You can't create spaghetti control flow with excepti
by Dylan16807 12y ago
I don't really agree there. Exceptions can only break out. They're a moderately stronger form of return. You can't create spaghetti control flow with exceptions.
- MetaCosm 12y agoRead this: http://www.lighterra.com/papers/exceptionsharmful/ http://www.lighterra.com/papers/exceptionsharmful/ There is a reason exceptions are often banned from environments and it isn't because they are awesome. They make code "exceptionally" (zing) hard to reason about.
- Dylan16807 12y agoThey can be bad without being goto-like/unstructured. You can make a lot of the same arguments about break statements when it comes to skipping code and reaching a statement without being sure what the previous statement was or screwing up your loop.