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,4ac6c27957bfd114 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread3.news.pas.earthlink.net.POSTED!a6202946!not-for-mail From: Jeffrey Carter Organization: jrcarter commercial-at acm [period | full stop] org User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.3) Gecko/20040910 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: What is the point of Private? References: <3debqiF6s66aeU1@individual.net> In-Reply-To: <3debqiF6s66aeU1@individual.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Sat, 30 Apr 2005 03:27:42 GMT NNTP-Posting-Host: 67.3.219.142 X-Complaints-To: abuse@earthlink.net X-Trace: newsread3.news.pas.earthlink.net 1114831662 67.3.219.142 (Fri, 29 Apr 2005 20:27:42 PDT) NNTP-Posting-Date: Fri, 29 Apr 2005 20:27:42 PDT Xref: g2news1.google.com comp.lang.ada:10843 Date: 2005-04-30T03:27:42+00:00 List-Id: Peter Amey wrote: > > I think there are real compiler design issues here. Modula 2 had > "opaque types" which were conceptually similar to private types. > However, Modula 2 had no equivalent of a package's private part which > meant that the size of the opaque type wasn't known and that all > implementations therefore required an opaque type to be implemented as a > pointer. Ada's scheme means the size is known to the compiler from the > package spec alone. Right. That's why it's not really needed by the compiler (which was the explanation I got in 1984), but it does make compilers a little simpler and eliminates the overhead of the indirection. -- Jeff Carter "Spam! Spam! Spam! Spam! Spam! Spam! Spam! Spam!" Monty Python's Flying Circus 53