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,1592759aa83d0d45 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-29 06:31:41 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!postnews1.google.com!not-for-mail From: wojtek@power.com.pl (Wojtek Narczynski) Newsgroups: comp.lang.ada Subject: Re: Suggestion for Ada 200x - Interface inheritance Date: 29 May 2003 06:31:41 -0700 Organization: http://groups.google.com/ Message-ID: <5ad0dd8a.0305290531.1ddf9eb4@posting.google.com> References: <0Pxza.699607$OV.652508@rwcrnsc54> <5ad0dd8a.0305240435.337d9373@posting.google.com> <5ad0dd8a.0305250612.ec54c23@posting.google.com> <3ED1039F.7010001@spam.com> <719Aa.14547$fT5.3595@nwrdny01.gnilink.net> NNTP-Posting-Host: 62.111.211.178 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1054215101 11211 127.0.0.1 (29 May 2003 13:31:41 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 29 May 2003 13:31:41 GMT Xref: archiver1.google.com comp.lang.ada:37993 Date: 2003-05-29T13:31:41+00:00 List-Id: Robert A Duff wrote in message news:... > I also think you should let the programmer decide which exceptions are > in which category. For example, an out-of-memory exception > (Storage_Error, in Ada) should, by default, not require any > declarations, since pretty-much anything can raise it. Just to clarify. In Java 'out of memory' is an Error, not Exception. You never need to declare it in throws clause, and you very rarely throw it by yourself, only when you are are doing malloc() by yourself. > Another point is that most exceptions are really preconditions. Yes! For example the Java IllegalArgument exception, you don't need to declare it, but practically most methods should throw it. Preconditions would do the job much better. > And finally, you want user-settable defaults. Like, "All procedures in > this package, and all of its descendants, behave such-and-such a way in > the presence of so-and-so exception." Yeah, I would want this. Regards, Wojtek