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,CP1252 X-Google-Thread: 103376,d6f7b92fd11ab291 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-07-21 22:02:54 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi_feed4!attbi.com!sccrnsc04.POSTED!not-for-mail Message-ID: <3F1CC567.5000407@attbi.com> From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Crosspost: Help wanted from comp.compilers References: <3F158832.1040206@attbi.com> <1058378673.35463@master.nyc.kbcfp.com> <1058390613.119827@master.nyc.kbcfp.com> <2OERa.4718$0F4.3216@nwrdny02.gnilink.net> <1058539398.178565@master.nyc.kbcfp.com> <3F18D647.9020505@attbi.com> <3F1B207B.6090308@attbi.com> <1058800464.63505@master.nyc.kbcfp.com> <3F1C48F6.8010700@attbi.com> <3b1Ta.14846$0F4.12183@nwrdny02.gnilink.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit NNTP-Posting-Host: 66.31.71.243 X-Complaints-To: abuse@comcast.net X-Trace: sccrnsc04 1058850173 66.31.71.243 (Tue, 22 Jul 2003 05:02:53 GMT) NNTP-Posting-Date: Tue, 22 Jul 2003 05:02:53 GMT Organization: Comcast Online Date: Tue, 22 Jul 2003 05:02:53 GMT Xref: archiver1.google.com comp.lang.ada:40604 Date: 2003-07-22T05:02:53+00:00 List-Id: Hyman Rosen wrote: > I'm starting to remember an earlier discussion on this subject, (that > I don't think I was involved in). If I recall correctly, it's valid to > define "exist in the environment" as "source code is readable" and to > define "compile" as "check that the code is legal". Then object file > generation doesn't have to be tied to the requirements that you are > talking about, so the issue can be sidestepped (while still remaining > true to both the letter and spirit of the Ada requirements). NO! Wrong. You can define a simple text copy as putting a unit in the environment. In effect GNAT among others does this for package specs. But there is no way to get around the ordering requirements, and there should not be. Some people get confused by the situation with generics. Modifying a generic body may seem like it should invaldate instances of the generic, but that is why the generic contract model is there. An implementation can however make the "compile" process a simple check-in and defer code generation until link time. I think Rational may still do that. But the whole dependency checking thing is one of the major strengths of Ada. Trying to short-cut it has been discovered time and again to not be worth the effort--whether or not it can be made to work. Similarly there was a lot of screaming about "elaboration checks" and access-before-elaboration issues in early Ada. The elaboration rules in Ada 83 (and Ada 95) were adopted fairly late in the standardization process. But once compiler vendors got used to them, the issue disappeared from most Ada programmer's event horizons. This is in part why I say that at least 80% of the Reference Manual deals with what happens when you try to shoot yourself in the foot. For most programmers who understand basic software engineering principles, all they need to know about overload resolution is that it works. All they need to know about semantic dependence is that sometimes when they call gnatmake (or whatever compiler) it will recompile some units they didn't touch. And they may never see Program_Error raised by an elaboration check, because almost all of the work is done in the main program, not in the sequence of statements of a package body. (In fact, I wonder how many package bodies even have a sequence of statements...) -- Robert I. Eachus �In an ally, considerations of house, clan, planet, race are insignificant beside two prime questions, which are: 1. Can he shoot? 2. Will he aim at your enemy?� -- from the Laiden novels by Sharon Lee and Steve Miller.