Comment

Comment by klahnako

Sorry, I am not convinced.

Java's exception handling may be slower, but exceptions should be rare: In the few cases exceptions are not rare, return an object instead.

The issue of loosing some variables is misleading. First, the heap is not rolled back, so many of the side effects are still available for inspection. Second, how often do you want one method to handle another method's variables, and if you do, is either method maintainable? Finally, if frame variables are important, then you can put them in the exception.

If you want to complain about loosing context, try PL-SQL: "Raising" an exception rolls back all evidence of there being a problem.

parent klahnako 18 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton