Skip to main content
10 events
when toggle format what by license comment
Oct 20, 2020 at 1:27 comment added Zbyszek I agree, especially with point 5, quote "means an increase in the number of man-hours for absolutely no gain". That's it. This approach makes code vague, not clear, confusing. It just requires form everyone additional time, energy to work with code.
May 23, 2017 at 12:40 history edited CommunityBot
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Sep 13, 2011 at 16:23 comment added Winston Ewert Just to be clear, I'm not advocating using exceptions are your general flow control mechanism. I advocate throwing an exception for any sort of "failure" mode no matter how minor. I think the exception handling version is cleaner and less likely to hide bugs then the return value checking version. And ideally, I'd like languages to make it harder to catch nested errors.
Sep 13, 2011 at 16:19 comment added Winston Ewert 4) It seems to me that it is only grammatically misleading to use exceptions this way if the common coding style doesn't use it that way. Hence why it seems that 4 and 5 are the same thing. And since common coding style in python is this way, I don't think either applies.
Sep 13, 2011 at 16:18 comment added Winston Ewert 3) Python has an else block for exceptions. It is massively helpful for avoiding the problems you'd typically get for 1 and 2.
Sep 13, 2011 at 15:27 comment added cwallenpoole @Winston I disagree. 1 and 2 are major issues which, while diminished by better coding standards, still make one wonder whether it might not be better to simply avoid the potential error to begin with. 3 applies if your language is Python. 4-5 can also apply for Python but they do not have to. 4 and 5 are very different points -- misleading is different from stylistic differences. Misleading code might be doing something like naming the trigger to start a vehicle the, "stop button." Stylistically, on the other hand, it could also be analogous to avoiding all block indentation in C.
Sep 13, 2011 at 14:52 history made wiki Post Made Community Wiki by Joeri Sebrechts
Sep 13, 2011 at 14:01 comment added Winston Ewert 4 and 5 seem to be the same point to me. 3-6 don't apply if your language is python. 1 and 2 are potential issues, but I think they are handled by minimizing the code in the try block.
Sep 13, 2011 at 6:23 comment added kevin cline AFAIK, #6 is a problem only in Java, which, unlike every other modern language, has neither closures nor stack-based resource management. It's certainly not a problem inherent in the use of exceptions.
Sep 13, 2011 at 4:03 history answered cwallenpoole CC BY-SA 3.0