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: 103376,f92fbb4a0420dd57 X-Google-Attributes: gid103376,public X-Google-Thread: 109fba,f92fbb4a0420dd57 X-Google-Attributes: gid109fba,public From: dewar@cs.nyu.edu (Robert Dewar) Subject: Re: some questions re. Ada/GNAT from a C++/GCC user Date: 1996/04/02 Message-ID: #1/1 X-Deja-AN: 145421172 references: <315D902C.6F7B@escmail.orl.mmc.com> <4jmuj5$lkh@dayuc.dayton.saic.com> <315F4A9D.7E6F@mcs.com> <4jq4vd$2s5@ferrari.NetXpress.com> organization: Courant Institute of Mathematical Sciences newsgroups: comp.lang.ada,comp.lang.c++ Date: 1996-04-02T00:00:00+00:00 List-Id: Glenn said: >Most folks that responded to this missed something. That it is simply >easier to parse source code that has all of the declarations in one >section while building a symbol table. They're all there in a group, >bundled together like in Pascal, making it much simpler to identify >them and enter them in the symbol table. That's simply a misconception. For correct programs, there is obviously no difference in the two cases from a compiler's point of view. For error recovery, the Pascal/Ada conventions are harder work for the compiler, because it has to try hard to identify the proper breakpoint between declarations and statements in mangled programs. If it gets confused on this point, you can get a lot of junk cascaded errors. If you have not written a compiler, you often find that your intuitions as to what might or might not help a compiler implementation are quite wrong. Even if you DO know a lot about compilers, you can find yourself surprised. There were restrictions in Ada 83 that were supposed to make life easier for the compier, but had exactly the opposite effect (e.g., for most compilers, the restrictoin on subunit names, now removed in Ada 95).