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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Encaspulation: What to export Date: Mon, 27 Nov 2017 21:39:01 +0000 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="b3c39c702bc8b6be7163c00cfd114dc3"; logging-data="6557"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+1PocwRHGP0cqXh2FhDNnemoEV81hGlGE=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (darwin) Cancel-Lock: sha1:7fRR5iHd4x1ht0q1vn36A3sAyvE= sha1:ILiAR0Tsg9sQ9XOzPaYE2f/CA5I= Xref: reader02.eternal-september.org comp.lang.ada:49219 Date: 2017-11-27T21:39:01+00:00 List-Id: Victor Porton writes: > I am writing free software containing a kinda parser, which converts from > external representation into the internal format of my Ada program. > > What should be in the public package interface and what in package body > only? > > Should I export only the parser for the main object (as it is the only > parser used by the rest of the program)? > > or should I export parsers for all subobjects (because exporting only the > main parser and not exporting the rest ones is kinda asymmetric: some parser > is exported and some are not)? The public part of the spec should contain only what clients need to see.