comp.lang.ada
 help / color / mirror / Atom feed
From: ichbiah@jdi.tiac.net (Jean D. Ichbiah)
Subject: Re: Why no exception hierarchy ?
Date: Tue, 28 Mar 1995 18:15:53 GMT
Date: 1995-03-28T18:15:53+00:00	[thread overview]
Message-ID: <ichbiah.263.2F785258@jdi.tiac.net> (raw)
In-Reply-To: 3l1mgn$ppb@gnat.cs.nyu.edu

In article <3l1mgn$ppb@gnat.cs.nyu.edu> dewar@cs.nyu.edu (Robert Dewar) writes:

>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 ...

Well said Robert.  In the Ada design (83) I spent several years reducing the 
18 or so exceptions of preliminary Green to the 5 of Ada.  I tried to convince
others to reduce it to one but was not convincing enough.

The logic for one is that there is not much you con do most of the 
time with the knowledge  of which exception.  You do know the current
process failed. But usually you do not have much information on where
it failed. So the only thing that matters is that you have to provide
a replacement solution.

The only proper way to be really sure of where an exception occurs
is to corner it within a narrow block (begin ... exception ... end) and once
you do this, the name of the exception does not matter much, nor does
the error code.

Jean D. Ichbiah




  reply	other threads:[~1995-03-28 18:15 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-03-23 23:10 Why no exception hierarchy ? Mogens Jensen
1995-03-24 11:19 ` Michel Gauthier
1995-03-24 21:52   ` Tucker Taft
1995-03-25  1:50   ` Kenneth Almquist
1995-03-25 12:40     ` David Weller
1995-03-27  5:47       ` Kenneth Almquist
1995-03-25 16:03     ` Larry Kilgallen, LJK Software
1995-03-27 19:23   ` Kenneth Almquist
1995-03-28 16:56     ` Larry Kilgallen, LJK Software
1995-03-29  0:00       ` Kevin F. Quinn
1995-03-30  0:00         ` Kevin F. Quinn
1995-03-31  0:00       ` Kenneth Almquist
1995-04-04  0:00       ` Robert Dewar
1995-04-05  0:00         ` Is "Ada" 95 or 83? (was: Re: Why no exception hierarchy ?) Theodore Dennison
1995-04-07  0:00           ` Robert Dewar
     [not found]         ` <1995Apr4.210804.9579@eisner.decus.org>
1995-04-05  0:00           ` Ada means what version by default ? Michael Feldman
1995-04-06  0:00             ` Larry Kilgallen
1995-04-07  0:00               ` Jean D. Ichbiah
1995-04-07  0:00               ` Robert Dewar
1995-04-05  0:00           ` Kevin F. Quinn
1995-04-07  0:00             ` Robert Dewar
1995-04-05  0:00         ` Why no exception hierarchy ? Michael Feldman
1995-04-05  0:00         ` Jean D. Ichbiah
1995-04-05  0:00           ` Robert A Duff
1995-04-05  0:00             ` Jean D. Ichbiah
1995-04-07  0:00               ` Robert Dewar
1995-04-05  0:00           ` Garlington KE
1995-04-06  0:00             ` Versions of Ada (was Why no exception hierarchy ?) Larry Kilgallen
1995-04-07  0:00               ` Robert Dewar
1995-04-07  0:00               ` Garlington KE
1995-04-06  0:00           ` Why no exception hierarchy ? Robert Dewar
1995-04-07  0:00             ` Jean D. Ichbiah
1995-04-07  0:00               ` Robert Dewar
1995-04-07  0:00             ` Garlington KE
1995-04-07  0:00             ` Norman H. Cohen
1995-04-06  0:00           ` Robert Dewar
1995-04-07  0:00             ` Jean D. Ichbiah
1995-04-06  0:00           ` Robert Dewar
1995-04-07  0:00             ` Jean D. Ichbiah
1995-04-07  0:00               ` Robert Dewar
1995-04-07  0:00       ` Ada means what version by default ? Robert I. Eachus
1995-03-25 18:13 ` Why no exception hierarchy ? Robert Dewar
1995-03-28 18:15   ` Jean D. Ichbiah [this message]
1995-03-31  0:00   ` Mats Weber
1995-04-04  0:00     ` Robert Dewar
1995-04-06  0:00       ` Mats Weber
1995-04-07  0:00         ` Kenneth Almquist
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox