comp.lang.ada
 help / color / mirror / Atom feed
From: "James Giles" <jamesgiles@worldnet.att.net>
Subject: Re: F9X twister & ADA (was: n-dim'l vectors)
Date: 2000/04/11
Date: 2000-04-11T00:00:00+00:00	[thread overview]
Message-ID: <cEKI4.1694$fV.133027@bgtnsc05-news.ops.worldnet.att.net> (raw)
In-Reply-To: 2000Apr11.135942.1@eisner


Larry Kilgallen wrote in message <2000Apr11.135942.1@eisner>...
>In article <5jJI4.297$PV.9915@bgtnsc06-news.ops.worldnet.att.net>, "James Giles"
<jamesgiles@worldnet.att.net> writes:
>
>> A given exception might be actually handled by a remote ancestor
>> in the call tree: which couldn't possibly have any specific knowledge
>> about how to recover from an error so remote.
>
>It depends upon error.  "disk space exhausted" would seem susceptible
>to a general (though gross) cleanup approach, possibly quite short of
>stopping the program.

If you unabiguously know where the problem arose, maybe (but only
maybe).  It may be possible to find a counterexample in the case of any
particular error.  But the contortions required to continue a computation
after an error get more elaborate the further the handler is from the
site of the error.  It seems to me a better structured approach is to
always handle errors (that you intend to recover from) as locally
as possible.  Non-specific "halt the program" messages can easily be
remotely handled.

Another issue is that the meaning of a given exception is different
depending on the context where it occurs.  At the lowest level
procedure, a "divide by zero" fault is just a arithmetical problem.
At the  next higher level, it may mean "second arg to function X
should not exceed the first".  At a the next higher level, it may mean
"structure ABC is discontinuous".  And so on.  If you intend to
recover from the fault, the identity of the error needs to be changed
at each level.  For the third procedure from the bottom to just get
"divide by zero" is probably meaningless in terms of the arguments
and functionality that it's aware of.

That's one of the things I meant when I said the Ada exception
mechanism tries to do to many different things.  Errors that you're
going to attempt to recover from are significantly different, conceptually,
from non-specific termination signals.

In any case, I don't intend to get into a long drawn out argument with
Ada supporters about their favorite language.  My interest is in what
exception handling might eventually be added to Fortran.  It is often
recommended to model the feature on Ada.  I think the committee
should consider addressing the shortcomings of Ada as well as its
advantages before just blanket adoption of the feature.

--
J. Giles






  reply	other threads:[~2000-04-11  0:00 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <8cctts$ujr$1@nnrp1.deja.com>
     [not found] ` <38EA0440.1ECBC158@ncep.noaa.gov>
2000-04-06  0:00   ` F9X twister & ADA (was: n-dim'l vectors) bv
2000-04-06  0:00     ` Richard Maine
2000-04-07  0:00       ` Brian Rogoff
2000-04-08  0:00         ` Dick Hendrickson
2000-04-08  0:00           ` Richard Maine
2000-04-09  0:00             ` Gary Scott
2000-04-09  0:00               ` Richard Maine
2000-04-09  0:00           ` Geoff Bull
2000-04-09  0:00             ` Dick Hendrickson
2000-04-09  0:00               ` Robert Dewar
2000-04-09  0:00                 ` Gordon Sande
2000-04-09  0:00                   ` James Giles
2000-04-10  0:00                 ` tmoran
2000-04-15  0:00                 ` Aidan Skinner
2000-04-17  0:00                   ` Robert I. Eachus
2000-04-16  0:00                 ` Ken Garlington
2000-04-12  0:00               ` Robert I. Eachus
2000-04-10  0:00       ` bv
2000-04-10  0:00         ` James Van Buskirk
2000-04-11  0:00         ` James Giles
2000-04-11  0:00           ` Dale Stanbrough
2000-04-11  0:00             ` James Giles
2000-04-12  0:00               ` Robert A Duff
2000-04-11  0:00           ` Geoff Bull
2000-04-11  0:00             ` James Giles
2000-04-11  0:00               ` Larry Kilgallen
2000-04-11  0:00                 ` James Giles [this message]
2000-04-11  0:00                   ` Larry Kilgallen
2000-04-12  0:00                   ` Robert A Duff
2000-04-12  0:00               ` Geoff Bull
2000-04-12  0:00                 ` James Giles
2000-04-12  0:00                   ` Geoff Bull
2000-04-12  0:00                     ` James Giles
2000-04-12  0:00                       ` Geoff Bull
2000-04-12  0:00                         ` James Giles
2000-04-13  0:00                           ` Geoff Bull
2000-04-13  0:00                             ` Debugging (was: F9X twister & ADA) James Giles
2000-04-13  0:00                             ` F9X twister & ADA (was: n-dim'l vectors) James Giles
2000-04-14  0:00                               ` Geoff Bull
2000-04-12  0:00                         ` Marin D. Condic
2000-04-12  0:00                           ` James Giles
2000-04-12  0:00                           ` James Giles
2000-04-14  0:00           ` bv
2000-04-07  0:00     ` Paul van Delst
2000-04-10  0:00       ` bv
2000-04-07  0:00     ` Erik Edelmann
2000-04-07  0:00       ` Robert Dewar
2000-04-07  0:00         ` Erik Edelmann
replies disabled

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