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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f7a9613bbc2bd8c9 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-14 07:04:24 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Generic default parameters Date: 14 May 2002 10:02:20 -0400 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: <60lvdu4ifauunm4qob6ir7rlas4soe0cp4@4ax.com> <8ep1eukksjmf65te5pvfreethdsbevsa9d@4ax.com> NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1021385339 27437 128.183.220.71 (14 May 2002 14:08:59 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 14 May 2002 14:08:59 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:24014 Date: 2002-05-14T14:08:59+00:00 List-Id: Dmitry A. Kazakov writes: > On 13 May 2002 12:42:45 -0400, Stephen Leake > wrote: > > >Hmm, perhaps you _wanted_ IO.Handles.IO_Handle to be public, so > >clients could do stuff. Simple : > > > >with Object.Handle; > >package IO.Handles is > > type IO_Handle is private; > >private > > package Handles is new Object.Handle (File_Descriptor, > > File_Descriptor_Ptr); > > type IO_Handle is new Handles.Handle with null record; > > > >end IO.Handles; > > Yes, but this would kill the nature of IO_Handle. It would be just a > private or a tagged private type. All operations defined on Handle get > invisible, as well as the fact that IO_Handle is a descendant of an > instance of Object.Handle. Well, I don't know what you want. You started out saying you wanted an "incomplete" type in the public part, with a full type in the private part that was from a generic instantiation. This gives you that. If you want "all operations defined on IO_Handle" to be visible, then why do you want an "incomplete" type in the public part? Why should a client know that IO_Handle is a derived type, especially since the parent type is invisible? I guess I need to see an example of how you think a client would use your new kind of type. That would make it clearer why a private type won't work. -- -- Stephe