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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC 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: Bruce.Conroy@jpl.nasa.gov Subject: Re: some questions re. Ada/GNAT from a C++/GCC user Date: 1996/04/01 Message-ID: <1996Apr1.192522.12725@llyene.jpl.nasa.gov>#1/1 X-Deja-AN: 145311737 sender: news@llyene.jpl.nasa.gov references: <315D902C.6F7B@escmail.orl.mmc.com> <4jmuj5$lkh@dayuc.dayton.saic.com> organization: Jet Propulsion Laboratory reply-to: Bruce.Conroy@jpl.nasa.gov newsgroups: comp.lang.ada Date: 1996-04-01T00:00:00+00:00 List-Id: In <4jmuj5$lkh@dayuc.dayton.saic.com>, John G. Volan writes: .. >Okay, maybe the tasking issue was a bit of a stretch. With respect to >tasks, I still feel that it's important to be able to distinguish the >difference between elaboration and execution, but I agree that this >doesn't give us a _comprehensive_ rationale for for Ada's strict rules >separating declarations from statements. > >Okay, then, can anybody who was in on the Ada83/Ada95 design process >give us a more comprehensive rationale for this strict separation, one >consequence of which being the need for declare statements? Warning: It >may not be sufficient to say that we need the blocks in order to define >the scope of the declarations, since as I pointed out, it might be >possible to come up with a coherent definition of the scope of a >declaration even with C's scheme (C manages it somehow, after all). [snip] The C rule is the same as the Ada rule. In C, any place a statement is allowed, you can put a curly bracket followed by any number of declarations, followed by any number of statements, followed by a curly bracket. The only difference in Ada is that the curly brackets are replaced by DECLARE and END, and the word BEGIN separates the declarations from the statements. There is no semantic difference at all. (It is C++ that allows declarations anywhere) Bruce Conroy