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,3d9acd0750841603 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!208.49.83.146.MISMATCH!atl-c08.usenetserver.com!news.usenetserver.com!pc02.usenetserver.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail Newsgroups: comp.lang.ada Subject: Re: How to hide type internals References: <1151664636.528401.15590@d56g2000cwd.googlegroups.com> From: Stephen Leake Date: Sun, 02 Jul 2006 11:23:02 -0400 Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (windows-nt) Cancel-Lock: sha1:Lre6zyo8eK1Acc+j/0AFVCL01qY= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: 6e18144a7e4e163d2959d21461 Xref: g2news2.google.com comp.lang.ada:5411 Date: 2006-07-02T11:23:02-04:00 List-Id: "Gerd" writes: > I would like to write a package that exports functions using a special > type, without showing the details in the spec (even not in the private > part). Others have shown how to do this. But I'd like to understand _why_ you want to do this. If it is just to explore the capabilities of the language, that's fine. But you should also understand the compiler issues involved. The reason Ada provides a private part in package specs is to provide information to the compiler to allow it to generate more efficient code (not using pointers, for example). One downside of providing information in the spec is more recompilation when the private part changes. -- -- Stephe