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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7d1a6bfc6489c17b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2000-09-05 11:06:26 PST Path: supernews.google.com!sn-xit-02!sn-east!supernews.com!news-feed.riddles.org.uk!newsfeed.direct.ca!look.ca!cpk-news-hub1.bbnplanet.com!news.gtei.net!news.mindspring.net!firehose.mindspring.com!not-for-mail From: Richard Riehle Newsgroups: comp.lang.ada Subject: Re: exiting a bloc Date: Tue, 05 Sep 2000 10:52:11 -0700 Organization: MindSpring Enterprises Message-ID: <39B532CB.73D359F8@ix.netcom.com> References: <39B15EA8.88DB58AB@netcourrier.com> <8orprn$b46$1@nnrp1.deja.com> NNTP-Posting-Host: d1.8a.d1.14 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Server-Date: 5 Sep 2000 18:04:45 GMT X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en Xref: supernews.google.com comp.lang.ada:498 Date: 2000-09-05T18:04:45+00:00 List-Id: Robert Dewar wrote: in response to article article <39B15EA8.88DB58AB@netcourrier.com> by Mathias Dolidon : > THe obvious answer is that a goto could be used, however, it is > almost certain that if we saw the entire code we would suggest > some other method. In particular, it is not at all clear why > you are using a block at all, it appears useless but of course > we do not have your entire code. This raises another interesting question regarding Ada design style. I know of one manager with responsibility for embedded Ada software who prohibits declare blocks in the code. In his mind, a declare block is an ad hoc construct that demonstrates insufficient attention to the overall design. In particular, when one is tempted to code a declare block, he insists it be promoted to a nested procedure accompanied, if necessary, by a pragma Inline. His point-of-view evolved over many years of watching declare blocks grow to cover several pages, become more convulted with the nesting of additional declare blocks during program maintenance, and transmogrify into long passages of increasingly unreadable code. It seems the declare block may be something akin to the Q&D programs we used to write (waddaya mean "used to", cries the chorus) where sloppy coding style was OK because the program was "small and no one would ever want to used it again anyway." So, are declare blocks, echoing the ancient Jeremiad of Dijkstra, "considered dangerous" ? Richard Riehle