Gabriel Sechan wrote:
Nope. Believe it or not, rational people can just happen to not like exceptions. Actually, from my conversations it seems to be about 50/50 between people who love them and despise them.

Interestingly, the arguments are usually never very well-defined, either. I've only seen two good arguments against them. The first is that they're "unstructured". You can branch from a deeply-nested location to a much less nested location without clear evidence in the code. Of course, if you're using exception processing this way, chances are whatever you're doing is poorly structured, or your language's idea of what constitutes an "exception" is overly broad. (Java, anyone?)

The other is that an exception is a postcondition failure. Eiffel has the ability to catch an exception inside a function (method, that is), but the only thing the exception handler can do is restart the function with the same arguments after altering local variables, or pass the exception up the chain after (presumedly) cleaning something up. Basically, you can't catch an exception and go back to normal processing. The argument is logical in the context of Eiffel. Hermes used a similar argument, in that if you return an exception, values returned may not have been set by the called process, so allowing the code to use those values violates the language's definition.

People who like exceptions like them for the same reason that people who don't like them dislike them: they're non-local control structures, and therefore impossible to ignore.

--
  Darren New / San Diego, CA, USA (PST)
    His kernel fu is strong.
    He studied at the Shao Linux Temple.

--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to