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,cb04cee6116c8ced X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nntp.club.cc.cmu.edu!micro-heart-of-gold.mit.edu!newsswitch.lcs.mit.edu!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Package's private parts and protected types Date: Thu, 11 Feb 2010 18:53:50 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <7ff3810f-3ee3-4f39-a54c-933ad7d0655c@36g2000yqu.googlegroups.com> <1v2la97s2yyvd.1rcy0ana8mver.dlg@40tude.net> <3bb38996-47f7-4f30-8255-f011501404b5@b10g2000yqa.googlegroups.com> <1qttzk1jbh24i$.xid2h7me3oec.dlg@40tude.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1265932428 16832 192.74.137.71 (11 Feb 2010 23:53:48 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Thu, 11 Feb 2010 23:53:48 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:32cg1LVA1rijkTbzFzIyWPCT/b0= Xref: g2news1.google.com comp.lang.ada:9131 Date: 2010-02-11T18:53:50-05:00 List-Id: "Randy Brukardt" writes: >...(For Janus/Ada, at least, every source file is compiled > separately, and code is generated as necessary without needing anything > other than direct semantic dependencies to have been previously compiled. > That model is impossible for separate private parts; the specification would > not contain enough information to generate any code or any code for calls to > it.) The Ada 83 model seemed to be that the compiler doesn't need to look at with'ed bodies to generate code. But that's bogus. All Ada compilers other than Janus/Ada look at bodies to generate code for generic instantiations. And you need to look at bodies to implement inlining properly. (Does Janus/Ada implement inlining?) Similarly for any other inter-package optimizations. Given that compilers do, in fact, look at bodies of with'ed packages, they could use the same mechanism for separate private parts. Or, if private parts didn't exist, to look at bodies to find the completion of private types, for example. - Bob