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,319ef0454c7765d5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-03-25 18:38:02 PST Path: nntp.gmd.de!news.rwth-aachen.de!news.rhrz.uni-bonn.de!RRZ.Uni-Koeln.DE!uni-duisburg.de!zib-berlin.de!news.mathworks.com!zombie.ncsc.mil!admii!cmcl2!thecourier.cims.nyu.edu!thecourier.cims.nyu.edu!nobody From: dewar@cs.nyu.edu (Robert Dewar) Newsgroups: comp.lang.ada Subject: Re: Why no exception hierarchy ? Date: 25 Mar 1995 13:13:43 -0500 Organization: Courant Institute of Mathematical Sciences Message-ID: <3l1mgn$ppb@gnat.cs.nyu.edu> References: <3ksv4s$f9e@news.uni-c.dk> NNTP-Posting-Host: gnat.cs.nyu.edu Date: 1995-03-25T13:13:43-05:00 List-Id: The rationale for not having a hierarchy of exceptions is simply simplicity. We looked at proposals for such extensions early on (see some of the arly mapping documents for details), but decided that the complexity was not worth it. There really is no problem with numeric_error and constraint_error except that the original language goofed in trying to distinguish exception conditions too finely, as became apparent later on. The current definition is just a kludge for backwards compatibility, really no Ada 95 programmer should even know about Numeric_Error. The overuse of exceptions, and in particular the over specification of fine distinctions in exceptions is a common design error in Ada programs, which would no doubt be encouraged by a fancier exception mechanism. For example, in one early version of the Posix interface, every error condition was mapped into a separate exception, but it becamse clear that it is much better to have a single exception with an error code. When Jean considered this particular point (the Posix point), he wondered to me whether perhaps a better language design would have been to have only one exception with an error code ...