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!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Instantiating package problems Date: Sun, 10 Jan 2016 14:38:20 -0700 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <7dcd49f3-b04f-4ea3-b431-5c27f73b9afe@googlegroups.com> <87poxixqmy.fsf@theworld.com> <112f5e6c-35c1-483a-b8dd-24f5f76dc6ce@googlegroups.com> <084197af-8e37-4250-a083-b45bd9ab4609@googlegroups.com> <5a81226f-e719-4ca8-8cbc-d02cf4ab56e7@googlegroups.com> <768bb8bd-ed12-4235-a663-fa71fcb42795@googlegroups.com> <2ae043b6-e745-4f27-a9ab-cc183a25ca56@googlegroups.com> <6583d5e1-2d8b-4c90-bb9d-9673061e76c7@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Injection-Date: Sun, 10 Jan 2016 21:35:41 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="caa759af2a9c666aec02942f6fe5abd6"; logging-data="22362"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+vL42PZMo6YOIGSro10cjz1D1ab0nj1iU=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 In-Reply-To: <6583d5e1-2d8b-4c90-bb9d-9673061e76c7@googlegroups.com> Cancel-Lock: sha1:xkOTGBoymiKB/QUpEoOru4gctnE= X-Enigmail-Draft-Status: N1110 Xref: news.eternal-september.org comp.lang.ada:29078 Date: 2016-01-10T14:38:20-07:00 List-Id: On 01/10/2016 12:43 PM, Andrew Shvets wrote: > Potentially stupid question. When you instantiate a record (which is > described in the private portion of a package), does that mean that the > insides (the different types, lists, arrays, etc.) that compose it are not > visible to others except through setter and getter methods? Is there some reason you have to quote the entirety of 9 msgs to ask this question? The client of a pkg with a private type does not have visibility of the full type declaration in the private part. The only things a client can do with a private type is declare objects of the type and call subprograms operating on the type. (If the type is not declared limited, the client can also assign values and call "=" and "/=".) "Instantiate" is an Ada technical term with a specific meaning relating to generics. It is meaningless applied to a record type. The Ada technical term is "declare an object of a record type", often shortened to "declare a record". -- Jeff Carter "Death awaits you all, with nasty, big, pointy teeth!" Monty Python & the Holy Grail 20