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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,98c463a9e98cfdf5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-07-05 07:35:24 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!64.152.100.70!ps01-sjc1!news.webusenet.com!pd2nf1so.cg.shawcable.net!residential.shaw.ca!news1.calgary.shaw.ca.POSTED!not-for-mail X-Trace-PostClient-IP: 24.80.253.172 Sender: stephen@anakin Newsgroups: comp.lang.ada Subject: Re: Ada exceptions. unchecked? References: <8db3d6c8.0206112300.3965a62b@posting.google.com> <3D0750F1.7A12342@raytheon.com> <$4ctS45vG2pB@eisner.encompasserve.org> <3D0771D3.FFEA1AA4@san.rr.com> <3D08ADF9.7040104@mail.com> <3D08CB6F.D68F18DE@san.rr.com> <3D08D2AA.1020502@mail.com> <3D08DAFC.D6BB2ECC@san.rr.com> <3D08DF3F.5080800@mail.com> <3D08E672.39F64AE4@san.rr.com> <3D08EF2D.6020406@mail.com> From: stephen@dino.dnsalias.com (Stephen J. Bevan) Message-ID: Organization: just me at home X-Newsreader: Gnus v5.7/Emacs 20.7 Date: Fri, 05 Jul 2002 14:35:23 GMT NNTP-Posting-Host: 24.69.255.206 X-Complaints-To: abuse@shaw.ca X-Trace: news1.calgary.shaw.ca 1025879723 24.69.255.206 (Fri, 05 Jul 2002 08:35:23 MDT) NNTP-Posting-Date: Fri, 05 Jul 2002 08:35:23 MDT Xref: archiver1.google.com comp.lang.ada:26875 Date: 2002-07-05T14:35:23+00:00 List-Id: Hyman Rosen writes: > Yes, the problem is that the program, or the programmer, > needs to know what exceptions to handle, but not every > routine needs to know it. It seems to me that this should > be accomplished through documentation. The Java designers decided that, like types, exceptions must be statically checked by the compiler***. They presumably did this for the same reason that they want types statically checked: to catch as many errors at compile time as possible (i.e. avoid an exception being thrown for which there is no handler). It is possible that they went too far with this and that statically checking exceptions causes more pain than it is worth. However, if you ask a Smalltalk or Lisp programmer they'll tell you that statically checking *types* (as is done in Ada) causes more pain than it is worth it would be better to use documentation and/or test cases. *** There is a loophole: RuntimeException (and any subclasses) can be thrown without listing it in a method signature.