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,FREEMAIL_FROM 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!postnews.google.com!a14g2000cwb.googlegroups.com!not-for-mail From: "Gerd" Newsgroups: comp.lang.ada Subject: Re: How to hide type internals Date: 4 Jul 2006 04:11:52 -0700 Organization: http://groups.google.com Message-ID: <1152011512.798125.301120@a14g2000cwb.googlegroups.com> References: <1151664636.528401.15590@d56g2000cwd.googlegroups.com> NNTP-Posting-Host: 62.159.113.204 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1152011517 31204 127.0.0.1 (4 Jul 2006 11:11:57 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 4 Jul 2006 11:11:57 +0000 (UTC) In-Reply-To: User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: a14g2000cwb.googlegroups.com; posting-host=62.159.113.204; posting-account=_FaVAg0AAAAYUPoPAQYNRFF35JBHf9i7 Xref: g2news2.google.com comp.lang.ada:5472 Date: 2006-07-04T04:11:52-07:00 List-Id: Stephen Leake schrieb: > "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. There are at least two reasons: If the definition is left to the body, a change of the definition needs only a recompilation of the body. If the full type is declared within the spec, you would have to recompile .all. packages that "with" this spec. Otherwise it would be enough to provide a compiled object-file with the spec. First this is a question of compile time (large system), second this would give the contractor a look into your internals. The first is a simple thing of money, the second is a security decision (e.g. if the "user" of this package has no clearance).