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=2.2 required=5.0 tests=BAYES_00,FROM_WORDY, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ca85d557480cf473 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-07-06 15:53:04 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!newsfeed.media.kyoto-u.ac.jp!newsfeed.gol.com!feed1.news.rcn.net!rcn!not-for-mail From: "Frank J. Lhota" Newsgroups: comp.lang.ada Subject: Re: Hiding a type Date: Sat, 6 Jul 2002 18:52:31 -0400 Message-ID: References: <3D27263F.7070101@hotmail.com> <7kJV8.2438$gy3.1099236449@newssvr12.news.prodigy.com> <3D2733F4.8010304@hotmail.com> Reply-To: "Frank J. Lhota" X-Trace: UmFuZG9tSVYdL/up4naHihGsIEfxC6knFSHxQgreK1YyNcaJowOggVE825xIw92m X-Complaints-To: abuse@rcn.com NNTP-Posting-Date: 6 Jul 2002 22:52:39 GMT X-Priority: 3 X-Mimeole: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MSMail-Priority: Normal Xref: archiver1.google.com comp.lang.ada:26910 Date: 2002-07-06T22:52:39+00:00 List-Id: > I don't want to expose the name Private_Type_Ptr because I know that it > might change in the future. I know it sounds silly so it's probably > just poor planning on my part. It doesn't sound silly, it is always a good idea to hide implementation details. On the other hand, Private_Type_Ptr as declared in your code snippet is not exposed, since it appears in the private portion of the Test package. The only units exposed to the private part of Test is the cooresponding package body, and any child package of Test. The clients of Test will not see this definition. My recommendation would be to skip the definition of Private_Type_Ptr entirely, and define Public_Name as the access type: package Test is type Public_Name is limited private; function Initialize( File_Name : String ) return Public_Name; procedure Process( Input : Public_Name ); private type Private_Type is record ... end record; type Public_Name is access all Private_Type; end Test;