From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7d3cb5920e882220 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Exceptions Date: Fri, 14 Dec 2007 12:29:01 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <5947aa62-2547-4fbb-bc46-1111b4a0dcc9@x69g2000hsx.googlegroups.com> <475c688f$0$17524$9b4e6d93@newsspool4.arcor-online.net> <4dae26fe-0c8a-46e1-9a33-43c18cf757ae@i3g2000hsf.googlegroups.com> <9f16235c-260a-460b-873c-2183c154cc0c@e25g2000prg.googlegroups.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1197653351 6502 192.74.137.71 (14 Dec 2007 17:29:11 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Fri, 14 Dec 2007 17:29:11 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:WrheYoi4PntpebUXUI4Iv3h1qgc= Xref: g2news1.google.com comp.lang.ada:18947 Date: 2007-12-14T12:29:01-05:00 List-Id: Ray Blaak writes: > Long experience with Java code leads me to believe they cause more problems > then they solve, simply due to the fact that the majority of programmers are > coding at a junior or "naive" level. > > So, when the compiler demands an exception handler, then by golly they > provide one -- one that simply swallows the exception with a log of > the stack trace. This is what I don't get. I know there are lots of not-so-good programmers around, but how hard could it be to teach that "junior" programmer how to do this particular thing right? It's not "rocket science". ;-) And if the programmer can't learn this much, maybe they don't have much aptitude for programming in the first place. > This is in fact far worse than not handling the exception at all, since > control flow is not aborted. Indeed. That's why exceptions are a good idea in the first place -- their default behavior is to STOP, as opposed to forging ahead blindly causing who-knows-what chaos. > So, the junior programmer evilly stuck in a do-nothing handler, but they had > no clue they were being evil. ... and the senior programmer reviews the code, and gives the junior one a few tips, and pretty soon ... ;-) - Bob