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,78b2880bc7e78e39 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-03-17 13:52:16 PST Newsgroups: comp.lang.ada Path: supernews.google.com!sn-xit-03!supernews.com!cyclone-sf.pbi.net!63.208.208.143!feed2.onemain.com!feed1.onemain.com!uunet!dca.uu.net!ash.uu.net!world!bobduff From: Robert A Duff Subject: Re: RISC Sender: bobduff@world.std.com (Robert A Duff) Message-ID: Date: Sat, 17 Mar 2001 21:51:08 GMT References: <98tt7g$88h$1@nh.pace.co.uk> Organization: The World Public Access UNIX, Brookline, MA X-Newsreader: Gnus v5.3/Emacs 19.34 Xref: supernews.google.com comp.lang.ada:5815 Date: 2001-03-17T21:51:08+00:00 List-Id: "Marin David Condic" writes: > Its hard to come up with absolute rules since it often requires subjective, > artistic judgements. Just keep in mind that the intention is to have a > mechanism that deals with *errors* - not anticipated conditions that can be > accommodated with some sort of "normal" processing. Which leaves open the definition of "error". Different folks have different notions of error. I think the point of exceptions is that whether a given condition is an "error" depends on your point of view. Eg, a data structure package that has a Remove_Item operation: if the data structure is empty, that's an error, and an exception is appropriate. But from the point of view of the client, this situation might be "normal" or might be a bug -- it's the programmer's choice. Another way to look at it is that the point of exceptions is to separate the code that *detects* errors from the code that *handles* those situations. If the code that detects something knows what to do about it, then exceptions aren't necessary -- that code can just have an 'if' statement that checks the condition, and handles the situation in the 'then' part. - Bob