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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1094ba,86e8c626be2471ae X-Google-Attributes: gid1094ba,public X-Google-Thread: 103376,fc050a66c3b5d87d X-Google-Attributes: gid103376,public From: "James Giles" Subject: Re: F9X twister & ADA (was: n-dim'l vectors) Date: 2000/04/11 Message-ID: #1/1 X-Deja-AN: 609765650 References: <8cctts$ujr$1@nnrp1.deja.com> <38EA0440.1ECBC158@ncep.noaa.gov> <38ED4ECA.ADB698C9@sdynamix.com> <38F28A85.53809F39@sdynamix.com> <38F2C1DC.5538F9F0@research.canon.com.au> <5jJI4.297$PV.9915@bgtnsc06-news.ops.worldnet.att.net> <2000Apr11.135942.1@eisner> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3612.1700 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc05-news.ops.worldnet.att.net 955479688 12.74.2.85 (Tue, 11 Apr 2000 19:01:28 GMT) Organization: AT&T Worldnet NNTP-Posting-Date: Tue, 11 Apr 2000 19:01:28 GMT Newsgroups: comp.lang.fortran,comp.lang.ada Date: 2000-04-11T00:00:00+00:00 List-Id: Larry Kilgallen wrote in message <2000Apr11.135942.1@eisner>... >In article <5jJI4.297$PV.9915@bgtnsc06-news.ops.worldnet.att.net>, "James Giles" 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