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,79bbf7e359159d0d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-04-09 21:00:06 PST Path: supernews.google.com!sn-xit-03!supernews.com!newsfeed.wirehub.nl!newsfeed.mesh.ad.jp!sjc-peer.news.verio.net!news.verio.net!sea-read.news.verio.net.POSTED!not-for-mail Newsgroups: comp.lang.ada From: Brian Rogoff Subject: Re: newbie can't get exceptions to work! In-Reply-To: <3AD2788C.7F2BAFA3@worldnet.att.net> Message-ID: References: <25%y6.2364$jz.201607@www.newsranger.com> <3ACDB29E.45B91316@earthlink.net> <3AD2788C.7F2BAFA3@worldnet.att.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Date: Tue, 10 Apr 2001 03:58:45 GMT NNTP-Posting-Host: 206.184.139.136 X-Complaints-To: abuse@verio.net X-Trace: sea-read.news.verio.net 986875125 206.184.139.136 (Tue, 10 Apr 2001 03:58:45 GMT) NNTP-Posting-Date: Tue, 10 Apr 2001 03:58:45 GMT Organization: Verio Xref: supernews.google.com comp.lang.ada:6694 Date: 2001-04-10T03:58:45+00:00 List-Id: On Tue, 10 Apr 2001, James Rogers wrote: > Robert A Duff wrote: > > > > Well, it's not just "begin end", but also "if ... end if", "procedure P > > ... end P", and so forth. > > > > Anyway, I like being able to see what the "end" is end of (as in "end > > if" or "end P"), so I don't like just "}". > > Even more interesting is the common practice among experienced C, > C++, and Java programmers to comment the closing "}" with an > indication of the block being closed: > > } // end if > > or > > } // end getCount() That's a very good point. I use that practice in all of my code where the length of a subprogram or conditional becomes a bit too long. I suppose, using the kind of argument used to justify some Ada restrictions, that someone could say that I should factor the code better. :-) > If this is a common practice, then how are "{}" better than > "begin end"? The need to use "{}" then follow up with clarifying > comments indicates that "{}" is, in fact, less readable. In any case, it's also dead easy to do this with {} as long as there is a trailing ";", so this anti {} argument still flounders. proc P is { } P; if cond then {} elsif cond {} endif; -- ok, somewhat superfluous package P is { private } P; etc. Please, when I say replace begin end with {} that doesn't mean idiotically adopt every C mistake, OK? Where is RBKD, who understands the idea of trying to argue both sides as a way to get to the bottom of things? In any case, this is an excellent feature of Ada. -- Brian