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-11 16:14:06 PST Path: supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!newsfeed.media.kyoto-u.ac.jp!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: <3AD4D3C2.E45751D9@worldnet.att.net> Message-ID: References: <3AD2788C.7F2BAFA3@worldnet.att.net> <9b1oqv$ikb$2@taliesin.netcom.net.uk> <3AD4D3C2.E45751D9@worldnet.att.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Date: Wed, 11 Apr 2001 23:13:22 GMT NNTP-Posting-Host: 206.184.139.136 X-Complaints-To: abuse@verio.net X-Trace: sea-read.news.verio.net 987030802 206.184.139.136 (Wed, 11 Apr 2001 23:13:22 GMT) NNTP-Posting-Date: Wed, 11 Apr 2001 23:13:22 GMT Organization: Verio Xref: supernews.google.com comp.lang.ada:6793 Date: 2001-04-11T23:13:22+00:00 List-Id: On Wed, 11 Apr 2001, James Rogers wrote: > Ayende Rahien wrote: > > Brian Rogoff suggested this: > > procedure P(){ > > } P; > > > > if (condition) { > > } if; > > > > I think it has the best of both worlds. > > Now why must we begin to place boolean expressions inside parens? If you read my original off the cuff proposal, you'll note that I didn't put the boolean expressions in parens, and I used endif, and elsif. Note that Dylan, which is an infix Lisp-like language with an Algolesque syntax, does parenthesize booleans in conditionals. I prefer the Ada choice here too. > According to the logic used to defend [] versus () for arrays, > doesn't this make an "if" statement look like a function call > followed by a code block? According to the logic used for defending () versus [] for arrays, we should just make everything look the same, like Lisp :-). > Also, the supposed virtues of "{}" (imho) fade when you need to > add a label to the closing brace. You now manage to save exactly > two characters (en), but you must add an additional semicolon. I'd make it optional, but, as in Ada, force matching if it is included. That way you get the benefit for short blocks. > In C, C++, and Java you can entirely omit the "{}", making the > "if" statement unbracketed. That is a bad practice in those > languages. It should not be adopted in any other langauges. Agreed. > Another point of observation concerning "{}". Look at the code > for anonymous inner classes in Java. I am not convinced that > curly braces are better than Ada's "begin/end" pairs. I explicitly said I thought that the syntax is *not* better, didn't I? OTOH, I don't think that it's that much worse of a choice, either. I agreed with Laurent that for a relatively unbiased programmer (I know, that's an oxymoron) it's really a non-issue, and that if you accept the idea that many programmers who are familiar with C syntax are unable to adapt, a strategy for a new Ada like language to be successful would include making it look a bit more like C. -- Brian