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: 109fba,f92fbb4a0420dd57 X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,f92fbb4a0420dd57 X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: some questions re. Ada/GNAT from a C++/GCC user Date: 1996/04/01 Message-ID: #1/1 X-Deja-AN: 145268942 references: <4jovi9$c2b@wdl1.wdl.loral.com> organization: The World Public Access UNIX, Brookline, MA newsgroups: comp.lang.ada,comp.lang.c++ Date: 1996-04-01T00:00:00+00:00 List-Id: In article <4jovi9$c2b@wdl1.wdl.loral.com>, Mark A Biggar wrote: >Yeah, 2 reasons. The first goes clear back to the original Ada Strawman >documnt which calls for a clear distinction between declarations and code >statements. But Ada does *not* have such a clear distinction. Declarations do lots of stuff at run time, in Ada. In Pascal, the "begin" makes sense -- that's where execution starts; everything before that is purely compile-time declarative stuff. Not true in Ada. If you're dealing with Strings, for example, you often end up with *most* of the run-time algorithm *before* the "begin", because Ada's Strings can't change size, so you need to build up the result by declaring objects (usually constants) during elaboration. >... The second reason is that is also the method of wraping an >exception handler around soem arbitary piece of code: Nah, this doesn't explain why I need extra syntax for very local variables. It explains why I need extra syntax when there are exception handlers, but there usually aren't. So this is another case of the tail wagging the dog. It's fine to have extra syntax to delimit the region in which an exception handler applies, but that shouldn't complicate things for somebody who just wants to declare a variable, and doesn't want any exception handling. - Bob