comp.lang.ada
 help / color / mirror / Atom feed
From: "John G. Volan" <johnv@ac3i.dseg.ti.com>
Subject: Re: Building blocks (Was: Design By Contract)
Date: 1997/09/15
Date: 1997-09-15T00:00:00+00:00	[thread overview]
Message-ID: <341D7EFA.3B60@ac3i.dseg.ti.com> (raw)
In-Reply-To: dewar.874257027@merv


Robert Dewar wrote:
> 
> The specific issue in Ada of whether it should be part of the syntax of
> the language to specify the exceptions that can be raised is of course
> one that was extensively discussed, and the quite deliberate decision was
> made that it is unhelpful to require these to be stated in the syntax.
> 
> The reason is that there are too many exceptions (Storage_Error, or the
> various IO errors if any IO is done, or other application defined system
> wide exceptions) which would be named all over the place and create clutter.
> Note that Program_Error would also have to be named almost everwhere because
> of the Access Before Elaboration (ABE) considerations.

There are a couple of strategies that could be applied to this problem:

(1) Take certain common language-defined exceptions as givens (e.g.,
Storage_Error, Program_Error, Constraint_Error).  That is to say, assume
that they are implicitly part of the interface of every
subprogram/method, and don't require the programmer to explicitly list
them.

(2) Make exceptions first-class objects, and take advantage of class
hierarchies to simplify subprogram/method interfaces.  For instance, IO
exceptions might be organized into a hierarchy rooted at some abstract
IO_Exception class.  A method could declare that it can raise any
IO_Exception, without having to explicitly list all the subclasses.

As I understand it, this is essentially the strategy Java uses.  I must
admit that I like being able to treat exceptions as first-class objects
organized in class hierarchies, and I miss that capability in Ada95.  I
wonder why this notion didn't catch on in the Ada95 design ... is it
because first-class exceptions would have introduced a so-called
"distributed overhead" into the language?

-- 
Internet.Usenet.Put_Signature 
  (Name       => "John G. Volan",
   Employer   => "Raytheon/TI Advanced C3I Systems, San Jose, CA",
   Work_Email => "jvolan@ti.com",
   Home_Email => "johnvolan@sprintmail.com",
   Slogan     => "Ada95: World's *FIRST* International-Standard OOPL",
   Disclaimer => "My employer never defined these opinions, so using " & 
                 "them would be totally erroneous...or is that just "  &
                 "nondeterministic behavior now? :-) ");




  reply	other threads:[~1997-09-15  0:00 UTC|newest]

Thread overview: 132+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-08-21  0:00 Critique of Ariane 5 paper (finally!) aek
     [not found] ` <33FC66AD.9A0799D4@calfp.co.uk>
1997-08-22  0:00   ` Robert S. White
1997-08-22  0:00     ` Samuel Mize
1997-08-22  0:00       ` Samuel Mize
1997-08-23  0:00     ` Ken Garlington
     [not found]   ` <33FFA4B1.3543@flash.net>
1997-08-26  0:00     ` Nick Leaton
     [not found]       ` <3403940F.4154@pseserv3.fw.hac.com>
1997-08-27  0:00         ` Design By Contract Ted Velkoff
     [not found]           ` <JSA.97Aug27180328@alexandria.organon.com>
1997-08-28  0:00             ` W. Wesley Groleau x4923
1997-09-03  0:00             ` Don Harrison
1997-09-03  0:00               ` Jon S Anthony
1997-09-04  0:00                 ` Don Harrison
     [not found]           ` <5u3c6v$gtf$2@miranda.gmrc.gecm.com>
1997-08-28  0:00             ` Patrick Doyle
1997-09-06  0:00               ` Joachim Durchholz
1997-09-06  0:00                 ` Patrick Doyle
     [not found]             ` <34058808.3BF@pseserv3.fw.hac.com>
1997-08-28  0:00               ` Darren New
     [not found]         ` <349224633wnr@eiffel.demon.co.uk>
1997-08-27  0:00           ` Design by Contract Robert Dewar
1997-08-29  0:00           ` Don Harrison
     [not found]         ` <EFM140.Fy9@syd.csa.com.au>
1997-08-28  0:00           ` Design By Contract Robert Dewar
1997-08-29  0:00             ` Don Harrison
1997-08-28  0:00           ` Jon S Anthony
1997-08-29  0:00             ` Patrick Doyle
1997-08-29  0:00               ` Jon S Anthony
     [not found]                 ` <EFqDw0.3x7@ecf.toronto.edu>
     [not found]                   ` <JSA.97Aug30145354@alexandria.organon.com>
1997-09-01  0:00                     ` Patrick Doyle
1997-08-29  0:00             ` Don Harrison
1997-08-29  0:00               ` Jon S Anthony
     [not found]                 ` <EFqE8L.4Eq@ecf.toronto.edu>
     [not found]                   ` <JSA.97Aug30145058@alexandria.organon.com>
1997-09-01  0:00                     ` Patrick Doyle
1997-09-02  0:00                 ` Don Harrison
1997-09-02  0:00                   ` Joerg Rodemann
1997-09-02  0:00                     ` Jon S Anthony
1997-09-02  0:00                   ` Jon S Anthony
1997-09-03  0:00                     ` Don Harrison
     [not found]                     ` <JSA.97Sep3201329@alexandria.organon.com>
1997-09-04  0:00                       ` Paul Johnson
1997-09-05  0:00                         ` Jon S Anthony
     [not found]                         ` <5un58u$9ih$1@gonzo.sun3.iaf.nl>
1997-09-06  0:00                           ` Building blocks (Was: Design By Contract) Joachim Durchholz
1997-09-08  0:00                           ` Paul Johnson
1997-09-08  0:00                             ` Brian Rogoff
1997-09-09  0:00                               ` Veli-Pekka Nousiainen
1997-09-09  0:00                                 ` Jon S Anthony
1997-09-09  0:00                               ` Veli-Pekka Nousiainen
1997-09-09  0:00                               ` Matthew Heaney
1997-09-09  0:00                                 ` W. Wesley Groleau x4923
1997-09-10  0:00                                   ` Robert A Duff
1997-09-12  0:00                                     ` Jon S Anthony
1997-09-09  0:00                                 ` Brian Rogoff
1997-09-10  0:00                                 ` Paul Johnson
1997-09-10  0:00                                   ` Darren New
1997-09-10  0:00                                   ` Matthew Heaney
1997-09-10  0:00                                 ` Robert Dewar
1997-09-12  0:00                                   ` Paul Johnson
1997-09-14  0:00                                     ` Robert Dewar
1997-09-14  0:00                                     ` Robert Dewar
1997-09-15  0:00                                       ` John G. Volan [this message]
1997-09-14  0:00                                     ` Robert Dewar
1997-09-12  0:00                                   ` Jon S Anthony
1997-09-12  0:00                                     ` Robert Dewar
1997-09-16  0:00                                       ` Brian Rogoff
1997-09-09  0:00                               ` W. Wesley Groleau x4923
1997-09-08  0:00                         ` Design By Contract Nick Leaton
1997-09-08  0:00                           ` Matthew Heaney
1997-09-09  0:00                           ` Paul Johnson
     [not found]                       ` <EFzLn7.481@ecf.toronto.edu>
1997-09-04  0:00                         ` Jon S Anthony
     [not found]                       ` <EFz0pD.E6n@syd.csa.com.au>
1997-09-05  0:00                         ` subjectivity W. Wesley Groleau x4923
1997-09-05  0:00                           ` subjectivity Matthew Heaney
1997-09-10  0:00                             ` subjectivity Don Harrison
1997-09-12  0:00                               ` subjectivity Jon S Anthony
1997-09-16  0:00                                 ` subjectivity Don Harrison
1997-09-16  0:00                                   ` subjectivity Jon S Anthony
1997-09-10  0:00                           ` subjectivity Don Harrison
1997-09-10  0:00                             ` subjectivity W. Wesley Groleau x4923
1997-09-10  0:00                             ` subjectivity W. Wesley Groleau x4923
1997-09-11  0:00                               ` subjectivity Don Harrison
1997-09-05  0:00                         ` Design By Contract W. Wesley Groleau x4923
     [not found]                         ` <JSA.97Sep4172912@alexandria.organon.com>
     [not found]                           ` <EG0oz8.F6M@syd.csa.com.au>
1997-09-05  0:00                             ` Jon S Anthony
1997-09-05  0:00                               ` Nick Leaton
1997-09-08  0:00                                 ` Jon S Anthony
1997-09-09  0:00                                   ` Nick Leaton
1997-09-10  0:00                                     ` Paul Johnson
1997-09-06  0:00                               ` Patrick Doyle
     [not found]                             ` <EG0rp7.GtL@syd.csa.com.au>
1997-09-05  0:00                               ` Matthew Heaney
1997-09-09  0:00                           ` Robert A Duff
1997-09-09  0:00                             ` Matthew Heaney
     [not found]       ` <3406BEF7.2FC3@flash.net>
     [not found]         ` <3406E0F7.6FF7ED99@calfp.co.uk>
1997-09-02  0:00           ` Critique of Ariane 5 paper (finally!) Ken Garlington
  -- strict thread matches above, loose matches on Subject: below --
1997-09-09  0:00 Building blocks (Was: Design By Contract) Marc Wachowitz
1997-09-15  0:00 ` Joachim Durchholz
1997-09-17  0:00 ` Paul Johnson
1997-09-18  0:00   ` Robert Dewar
1997-09-18  0:00   ` Jon S Anthony
1997-09-18  0:00   ` Stephen Leake
1997-09-18  0:00     ` W. Wesley Groleau x4923
1997-09-21  0:00       ` Matthew Heaney
1997-09-18  0:00     ` Mark L. Fussell
1997-09-19  0:00       ` Jon S Anthony
1997-09-23  0:00         ` Mark L. Fussell
     [not found]       ` <11861963wnr@eiffel.demon.co.uk>
1997-09-19  0:00         ` Mark L. Fussell
1997-09-19  0:00       ` Robert A Duff
1997-09-20  0:00         ` Joachim Durchholz
1997-09-22  0:00           ` Matthew Heaney
1997-09-23  0:00             ` Veli-Pekka Nousiainen
1997-10-03  0:00               ` Robert I. Eachus
1997-10-04  0:00                 ` Paul Johnson
1997-10-14  0:00                   ` Robert I. Eachus
1997-09-23  0:00             ` Joachim Durchholz
1997-09-23  0:00           ` Jon S Anthony
1997-09-24  0:00           ` Alan E & Carmel J Brain
1997-09-25  0:00             ` Anonymous
1997-09-30  0:00               ` Alan E & Carmel J Brain
1997-09-30  0:00                 ` Matthew Heaney
1997-09-30  0:00                   ` Neil Wilson
1997-09-30  0:00                     ` Stephen Leake
1997-09-30  0:00                   ` W. Wesley Groleau x4923
1997-09-30  0:00                     ` Matthew Heaney
1997-10-01  0:00                     ` Alan E & Carmel J Brain
1997-10-01  0:00                 ` Anonymous
1997-10-01  0:00                   ` Paul M Gover
1997-10-04  0:00                     ` Paul Johnson
1997-10-04  0:00                       ` Matthew Heaney
1997-10-15  0:00                         ` Paul Johnson
1997-10-15  0:00                           ` Matthew Heaney
1997-10-16  0:00                             ` Joachim Durchholz
1997-10-17  0:00                               ` Robert I. Eachus
1997-10-16  0:00                           ` Joachim Durchholz
1997-10-22  0:00                           ` Reimer Behrends
1997-10-01  0:00                   ` Joachim Durchholz
1997-10-02  0:00                   ` Robert A Duff
1997-10-02  0:00                     ` Tucker Taft
1997-10-02  0:00                       ` Matthew Heaney
1997-10-03  0:00                     ` Stephen Leake
1997-10-04  0:00                     ` Matthew Heaney
1997-10-07  0:00                       ` Robert A Duff
1997-09-24  0:00           ` Richard A. O'Keefe
1997-09-09  0:00 Marc Wachowitz
1997-09-11  0:00 Robert Dewar
replies disabled

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