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-Thread: 103376,691503f3d2c9213d X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Question about circular elaboration order error (GNAT). Date: Mon, 14 Apr 2008 16:21:54 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <48024d11$0$19786$4d3efbfe@news.sover.net> <87skxppmlk.fsf@willow.rfc1149.net> <87od8dpi39.fsf@willow.rfc1149.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1208204514 12822 192.74.137.71 (14 Apr 2008 20:21:54 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Mon, 14 Apr 2008 20:21:54 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:K82at85K9Mk4Kj+uTvZiR1ltXpI= Xref: g2news1.google.com comp.lang.ada:20945 Date: 2008-04-14T16:21:54-04:00 List-Id: Samuel Tardieu writes: >>>>>> "Robert" == Robert A Duff writes: > > Robert> Samuel Tardieu writes: >>> No. pragma Elaborate_All is transitive, and forces the elaboration >>> of Parent body (since Parent.Child has an implicit dependency on >>> Parent) > > Robert> Yes, it has a dependence. But why do you call it "implicit"? > > Because it is not spelt explicitely using a with clause or an > Elaborate/Elaborate_All pragma. And if it's not explicit, it must be > implicit. OK. To me, the primary purpose of a with clause, and the primary purpose of a parent name, is their effect on visibility. Both appear explicitly in the code. Secondary issues are semantic dependences, compilation dependences, and elaboration-order dependences. So I don't see one as more "implicit" than the other. The reason I asked is that "implicit" is often a matter of opinion, and I'm curious about what it means to people in cases like this. There was some argument at AdaCore recently about what pragma Restrictions (No_Implicit_Heap_Allocations); means in a certain obscure case. > One could say that when you write "package Parent.Child", you > explicitely spell "Parent" so this is an explicit dependency > declaration. Yes, one could, and I do. ;-) >...However, for me it is a declaration of the "Parent.Child" > package, which implicitely creates a semantic dependency on Parent. > > Now, I think we are both nitpicking here,... Nitpicking? Yes, I plead guilty as charged. ;-) >... as I don't think the RM says > anything about "explicit" vs. "implicit" dependencies, it only > consider "static dependences" and "elaboration dependences". > > Btw, I never noticed the use of "dependence" vs. "dependency" > before. Is there a difference in English? I don't know. Most people say "dependency". But the Ada 83 RM used "dependence", and we didn't change it for Ada 95 (or 2005), and I've gotten used to typing that. Note that the primary author of Ada 83 was a Frenchman. ;-) - Bob