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!news2.google.com!newsread.com!news-xfer.newsread.com!news-feed01.roc.ny.frontiernet.net!nntp.frontiernet.net!newshosting.com!nx01.iad01.newshosting.com!130.81.64.211.MISMATCH!cycny01.gnilink.net!cyclone1.gnilink.net!spamkiller2.gnilink.net!gnilink.net!trndny06.POSTED!c2bfcbcf!not-for-mail Newsgroups: comp.lang.ada Subject: Re: What is the point of Private? References: Message-ID: From: "Ed Falis" Content-Type: text/plain; format=flowed; delsp=yes; charset=us-ascii MIME-Version: 1.0 Content-Transfer-Encoding: 8bit User-Agent: Opera M2/8.0 (Linux, build 1092) Date: Thu, 28 Apr 2005 23:40:06 GMT NNTP-Posting-Host: 70.22.178.165 X-Complaints-To: abuse@verizon.net X-Trace: trndny06 1114731606 70.22.178.165 (Thu, 28 Apr 2005 19:40:06 EDT) NNTP-Posting-Date: Thu, 28 Apr 2005 19:40:06 EDT Xref: g2news1.google.com comp.lang.ada:10793 Date: 2005-04-28T23:40:06+00:00 List-Id: On Thu, 28 Apr 2005 19:22:23 -0400, Simon Smith wrote: > however I dont really understand the point of it. > > Why is it there? I am sure I have heard talk that its to stop the client > from seeing exactly how the data is stored/manipulated however if people > really did want to know this wouldn't they just scroll down the ada spec > file and find out for themselves or am I missing something here? The point is not to hide information from developers - it's to narrow the way that client code interacts with the services provided by a package, to provide interfaces that are straightforward to reason about. An useful way to think about package specs is that the public part provides a logical interface representing the abstractions provided by the package, while the private part provides any additional relevant physical interface that the compiler might need. (I believe this metaphor is from Tucker Taft).