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: a07f3367d7,9983e856ed268154 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.66.85.231 with SMTP id k7mr1861828paz.38.1344325282922; Tue, 07 Aug 2012 00:41:22 -0700 (PDT) Path: g9ni2545pbo.0!nntp.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!ctu-peer!ctu-gate!news.nctu.edu.tw!usenet.stanford.edu!panix!newsfeed-00.mathworks.com!nntp.TheWorld.com!.POSTED!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Should Inline be private in the private part of a package spec? Date: Fri, 03 Aug 2012 14:07:28 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <501bd285$0$6564$9b4e6d93@newsspool4.arcor-online.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 X-Trace: pcls6.std.com 1344017248 15282 192.74.137.71 (3 Aug 2012 18:07:28 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Fri, 3 Aug 2012 18:07:28 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:TDsKrpZQXFEP3rqvCe/BdNXTqK0= X-Received-Bytes: 2731 Content-Type: text/plain; charset=us-ascii Date: 2012-08-03T14:07:28-04:00 List-Id: Adam Beneschan writes: > # I don't believe that either Inline or Import should be hidden in the private > # part, because both have (subtle) semantic effects that potentially break > # privacy. In particular, inline adds dependencies that might make linking a > # program impossible. I don't think that's right. Inline doesn't add dependencies. >...(I don't think inline should be allowed to do that, > # either, but that's the way it is.) I don't think inline should be allowed to do that, either -- fortunately, that's not the way it is. ;-) If you (Randy) don't agree, please quote chapter&verse. I just tried the following example, which has mutually-recursive inlining, and gnat didn't have any trouble compiling it or linking it. I think that's required -- a compiler would be wrong to say this example is illegal. package P1 is procedure Proc1 with Inline; procedure Proc2 with Inline; end P1; with Text_IO; use Text_IO; with P2; package body P1 is procedure Proc1 is begin Put_Line ("Proc1"); end Proc1; procedure Proc2 is begin P2.Proc2; end Proc2; end P1; package P2 is procedure Proc1 with Inline; procedure Proc2 with Inline; end P2; with Text_IO; use Text_IO; with P1; package body P2 is procedure Proc1 is begin P1.Proc1; end Proc1; procedure Proc2 is begin Put_Line ("Proc2"); end Proc2; end P2; with P1, P2; procedure Main is begin P1.Proc2; P2.Proc1; end Main; - Bob