gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] Nit


From: Dustin Sallings
Subject: Re: [Gnu-arch-users] Nit
Date: Tue, 21 Oct 2003 20:47:04 -0700


On Tuesday, Oct 21, 2003, at 19:49 US/Pacific, Tom Lord wrote:

   People have been talking about Java on this list like it is an
   examplar of great language design ("mature software") and promoting
   Java coding conventions that exacerbate the safety problems ("don't
   just catch and retrhow errors").

Java is certainly not my favorite language, but I think it's one of the better examples of exception handling models. I mean, you've found an interesting hole in their model which certainly has produced a bug somewhere. However, I'd argue that that bug isn't nearly as bad as many of the bugs that have been produced from ignoring error conditions altogether. Technically, the error is still handled.

Worse are the people who go out of their way to ignore exceptions...or otherwise cover up problems (pretty much any time someone calls e.getMessage() they're hiding a problem). I think we're a long way from creating a language that won't allow people to cover up problems. Making it more work to cover up problems than to deal with them is a good start, though.

Agreed.  The context of my burbling about B_fn and friends is simply
to, slowly and gently, point out that Java is not a safe language
unless programs are written with a discipline that, according to
Java-fans on this list, is positively discouraged.  The discouraged
discipline (or better, changes to the Java language) would all but
_force_ the use of separate exception classes in this instance.  But
Java as reportedly practiced, and as the langauge spec enforces,
respectively encourages and permits fatal mistakes in this area.

It's not java-fans, it's people who have to work with it every day and understand the patterns that produce successful and reliable chunks of code. You're dismissing an entire methodology because you think you've found a small hole that might cause an exception to be handled in the wrong place. I disagree and would like to see a concrete example of this actually causing a problem.

You appear to be an exceptional developer in your areas of expertise, but you don't seem to have the experience with writing reliable java applications that some of the ``java-fans'' have. Good design is still part of the battle, and you might be surprised to find that in a well-designed application, your theoretical problem never amounts to much.

--
SPY                      My girlfriend asked me which one I like better.
pub  1024/3CAE01D5 1994/11/03 Dustin Sallings <address@hidden>
|    Key fingerprint =  87 02 57 08 02 D0 DA D6  C8 0F 3E 65 51 98 D8 BE
L_______________________ I hope the answer won't upset her. ____________





reply via email to

[Prev in Thread] Current Thread [Next in Thread]