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: 103376,f92fbb4a0420dd57 X-Google-Attributes: gid103376,public From: adaworks@netcom.com (AdaWorks) Subject: Re: some questions re. Ada/GNAT from a C++/GCC user Date: 1996/04/04 Message-ID: #1/1 X-Deja-AN: 145712008 sender: adaworks@netcom22.netcom.com references: <315D902C.6F7B@escmail.orl.mmc.com> <4jmuj5$lkh@dayuc.dayton.saic.com> organization: Richard Riehle (adaworks@netcom.com) newsgroups: comp.lang.ada Date: 1996-04-04T00:00:00+00:00 List-Id: Scott Leschke (leschkes@ferret.cig.mot.com) wrote: : if ConditionA then : DoA; : exception : when ExceptionA => Actually, I can think of examples from programming languages which do permits just this sort of thing. The one which comes most quickly to mind is from COBOL, Read ... On Size-Error ... or Search ... At End ... among others. Even some variants of BASIC have an ON ERROR ... statement. The virtues, if any, of the declare block are not limited to exception handling. A simple, begin ... exception ... end; will accomplish that purpose. Though I prefer infrequent usage of ad hoc constructs whether explict as "declare blocks" or implicit via in-line declarations, I tend to believe that when such constructs are appropriate, the declare block will provide greater service over the full life-cycle of a deployed software product. While brevity may be the soul of wit, clarity would seem to be the soul of understanding. In the end, however, we each gravitate toward the idiom that feels most comfortable. A great Rabbi is reported to have said (paraphrasing), "For those who believe an idea to be true, no proof is necessary. For those who do not, no proof is possible." Richard -- richard@adaworks.com AdaWorks Software Engineering Suite 27 2555 Park Boulevard Palo Alto, CA 94306 (415) 328-1815 FAX 328-1112