On Aug 21, 2:07 pm, Peter Becker <peter.becker...@gmail.com> wrote: > I take the point that it is possible to make code harder to read using > exceptions in a way that is not possible without. I must admit I didn't > really think it through when I read Joel's blog post.
I think the reduced readability is the core disadvantage of using Exceptions. And I think that it is easier to create buggy code with exceptions - especially for beginners. (I know that most of those doing Java do it since a long while but they get older and junger people must somehow follow them). > There is the opposite danger, though: ignoring a return value. Since > C-like languages allow functions to be called as statements, it is > pretty easy to just ignore the fact that there is an error code > returned. Checked exceptions force you to deal with the issue. Whether it is an exception or a return code you always can drop it or deal with it. When I use a method like openFile or something the first thing automatically is to look for a return code. > Of course that problem could also be fixed by disallowing calling > functions as statements, which I think would be a good idea not just for > this reason. I would loose then the option to ignore the result which may make sense (e.g. loading an optional configuration file). People want closures, annotations and all the like but then I should get limited how to use a simple method? Best regards, Martin. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to javaposse@googlegroups.com To unsubscribe from this group, send email to javaposse+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~----------~----~----~----~------~----~------~--~---