IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New You have to balance benefit/cost
Do you use goto extensively? Why or why not?

Yet the fact is that goto is only harmful when misused. As Knuth famously pointed out in a paper devoted to the subject, goto has legitimate uses within structured programming. (At least in languages like C which do not have labelled loop control.) Why then do people generally discourage its use so strongly?

You use the example of Perl being bad. It is a truism that it is really easy to code unmaintainable code in any language. It is obvious that Perl has a poor reputation in this way. However Perl also has an excellent reputation for resulting in good productivity. And Perl certainly has been an effective tool for a lot of people. It has costs and benefits. Sometimes it is worthwhile, and sometimes it isn't. Choose wisely for your situation.

You use the example of inheritance being bad. The same thing holds. There is a skill to design, and people only learn what the problems are by making mistakes. It is obvious that there are benefits and costs of inheritance and make a case for when it is appropriate.

So far I am speaking in truisms. So it is a truism that the same must hold for checked exceptions. As I pointed out in [link|http://z.iwethey.org/forums/render/content/show?contentid=118648|http://z.iwethey.org...?contentid=118648], the benefit as I understand it to checked exceptions is that it makes it easier to prove that you have accounted for every possible exceptional case somehow. If that is your primary goal, and the goal of your whole team, then I'll buy that checked exceptions could be worthwhile.

But checked exceptions are in the (very long) list of technologies that require extra work from users to solve a problem that most of them don't care about. Every last one of those technologies - checked exceptions included - runs into constant problems as users set out to satisfy their goals and therefore shortcut on the extra work in the most convenient way possible. Which, in the case of checked exceptions, is going to mean that errors get swallowed from time to time.

The vast majority of programmers need to make some pragmatic tradeoff between things like bugs, development speed, the ability to make random changes later, etc. Statically proving at compile time that every i is dotted and t is crossed in all possible exceptional circumstances is rarely anywhere near a top priority. It certainly is lower than guaranteeing that code does what it is supposed to do in response to different kinds of user input.

If you are, or you work with, programmers who do not prioritize what checked exceptions can do for you, then they are not going to be worthwhile. More than not just being worthwhile, but people working around checked exceptions to satisfy their personal goals is likely to lead to poorer satisfaction of my goals. I think that this clearly covers most of us.

So, except for a vanishingly small fraction of programmers, I do not see that checked exceptions are worthwhile.

Cheers,
Ben
"good ideas and bad code build communities, the other three combinations do not"
- [link|http://archives.real-time.com/pipermail/cocoon-devel/2000-October/003023.html|Stefano Mazzocchi]
New s/Knuth/Dijkstra/
[link|http://www.acm.org/classics/oct95/|Go To Statement Considered Harmful].
Alex

Necessity is the plea for every infringement of human freedom ... the argument of tyrants ... the creed of slaves. -- William Pitt, addressing the British House of Commons (1783)
New I had it right the first time
Specifically I was thinking of Structured Programming with go to Statements, which is not available consistently on the web, but you can sometimes find a copy through Google. (Which doesn't last because it is a copyright violation.)

Cheers,
Ben
"good ideas and bad code build communities, the other three combinations do not"
- [link|http://archives.real-time.com/pipermail/cocoon-devel/2000-October/003023.html|Stefano Mazzocchi]
New I stand corrected then.
[link|http://www.stevemcconnell.com/ccgoto.htm|The Argument for gotos].
Alex

Necessity is the plea for every infringement of human freedom ... the argument of tyrants ... the creed of slaves. -- William Pitt, addressing the British House of Commons (1783)
     Exception Handling Policy - (JimWeirich) - (48)
         Possibly it depends on what level of code you are writing... - (Simon_Jester) - (38)
             Ditto. - (admin) - (37)
                 Because checked exceptions are STOOPID! - (tuberculosis) - (35)
                     One reason I like Spring Framework - (admin) - (1)
                         Absolutely - (bluke)
                     Re: Because checked exceptions are STOOPID! - (dshellman) - (23)
                         One respectable reason - (admin) - (13)
                             Re: One respectable reason - (dshellman) - (12)
                                 The problem with Java model is that I cannot - (Arkadiy) - (1)
                                     Re: The problem with Java model is that I cannot - (dshellman)
                                 But that would (i.e, *does*) defeat the whole purpose! - (CRConrad) - (3)
                                     ICLRPD (new thread) - (drewk)
                                     Re: But that would (i.e, *does*) defeat the whole purpose! - (dshellman) - (1)
                                         Sorry, either I don't get your meaning, or you didn't mine. - (CRConrad)
                                 What ends up happening ... - (bluke) - (5)
                                     Re: What ends up happening ... - (dshellman) - (4)
                                         Re: What ends up happening ... - (tuberculosis)
                                         You didn't answer the question ... - (bluke) - (2)
                                             Re: You didn't answer the question ... - (dshellman) - (1)
                                                 A number of comments - (bluke)
                         We already discussed this - (ben_tilly) - (8)
                             Re: We already discussed this - (dshellman) - (7)
                                 Blame the tool - (tuberculosis)
                                 You're right, that is unfortunate - (ben_tilly) - (5)
                                     Re: You're right, that is unfortunate - (dshellman) - (4)
                                         You have to balance benefit/cost - (ben_tilly) - (3)
                                             s/Knuth/Dijkstra/ - (a6l6e6x) - (2)
                                                 I had it right the first time - (ben_tilly) - (1)
                                                     I stand corrected then. - (a6l6e6x)
                     Re: Because checked exceptions are STOOPID! - (dshellman) - (8)
                         Hmm... - (CRConrad)
                         One phrase says it all. - (Arkadiy) - (6)
                             Caught my eye too - (tuberculosis)
                             Re: One phrase says it all. - (dshellman) - (4)
                                 I remain unconvinced - (tuberculosis)
                                 A Further Question on the Code Example - (JimWeirich) - (1)
                                     Re: A Further Question on the Code Example - (dshellman)
                                 Bad for class libraries? - (Arkadiy)
                 Re: Ditto. - (JimWeirich)
         I meant Exception the class - (bluke) - (7)
             Don't catch null pointer exceptions? - (JimWeirich) - (6)
                 In development yes - (bluke) - (5)
                     Re: In development yes - (JimWeirich) - (4)
                         Agreed - (bluke) - (3)
                             So wouldn't the remedy be... - (CRConrad) - (2)
                                 cf. Spring Framework :-) -NT - (admin)
                                 I agree ... - (bluke)
         Another reason to catch specifics - (jb4)

Houston, we have a problem.
114 ms