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,5486a6bc39241084 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-12 05:44:53 PST Path: archiver1.google.com!news2.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!btnet-peer0!btnet!news5-gui.server.ntli.net!ntli.net!news2-win.server.ntlworld.com.POSTED!not-for-mail From: "chris.danx" Newsgroups: comp.lang.ada References: Subject: Re: Questions on implementations and specs MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: Date: Fri, 12 Oct 2001 13:39:52 +0100 NNTP-Posting-Host: 62.253.8.187 X-Complaints-To: abuse@ntlworld.com X-Trace: news2-win.server.ntlworld.com 1002890380 62.253.8.187 (Fri, 12 Oct 2001 13:39:40 BST) NNTP-Posting-Date: Fri, 12 Oct 2001 13:39:40 BST Organization: ntlworld News Service Xref: archiver1.google.com comp.lang.ada:14384 Date: 2001-10-12T13:39:52+01:00 List-Id: "Aidan Skinner" wrote in message news:slrn9sdhka.hnq.aidan@crushed.velvet.net... > On Thu, 11 Oct 2001 18:03:41 +0100, chris.danx > wrote in : > > > documented). I was under the impression that the programmer should not need > > to look at the implementation *in most cases* (of course there are cases > > when we do need to look at the implementation). > > This is one of the areas where I like Java over Ada. The raises statement > and it's enforcement by the compiler are, IMO, very very useful. It might be nice to see some optional method of specifying exceptions that a routine may generate (need not specify them all), like name_error : exception; procedure open (file : file_type) with exception (name_error, blah_blah); but I think the Java 'must specify exceptions' is a pain mostly (even though it helps with documenting exceptions). > Being able to see clearly what each method/function/procedure can generate > is a great help, although they should be documented by the package spec, > it's not always... There are a lot of implied exceptions (like constraint_error) which don't need documentation but in some cases where a condition could arise that is important and there is no alternative method to detect the condition, the exception signalling the condition should be documented, IMO. Chris