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=-0.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ce0900b60ca3f616 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-05 07:34:16 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!newsfeed.online.be!fr.clara.net!heighliner.fr.clara.net!157.161.139.35.MISMATCH!60370065!news.imp.ch!psinet-eu-nl!psiuk-p4!psiuk-p3!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: List container strawman Date: Mon, 5 Nov 2001 10:10:55 -0500 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: <9s6a60$a49$1@nh.pace.co.uk> References: <9rti6v$hcu$1@news.huji.ac.il> <1EyE7.10050$xS6.13527@www.newsranger.com> <9rue9f$j4t$1@nh.pace.co.uk> <9ruiet$kqg$1@nh.pace.co.uk> <3BE3235D.E292B890@boeing.com> NNTP-Posting-Host: dhcp-200-133.miami.pace.co.uk X-Trace: nh.pace.co.uk 1004973056 10377 136.170.200.133 (5 Nov 2001 15:10:56 GMT) X-Complaints-To: newsmaster@news.cam.pace.co.uk NNTP-Posting-Date: 5 Nov 2001 15:10:56 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:15813 Date: 2001-11-05T15:10:56+00:00 List-Id: "Jeffrey Carter" wrote in message news:3BE3235D.E292B890@boeing.com... > > There's no problem with the actual type being Controlled if the formal > type is [limited] private. If there's anything about the actual type > that requires finalization we would hope the client would implement it > as a controlled type, since objects of this type are going to come and > go as items are added and removed from the structure. > I think you missed it. Its the other way around. I was asking if the list type you might be exporting from the generic package can be private and contain something that is controlled. generic type Something is private ; package A_Package is type Something_Else is private ; private type Something_Else is record X : Some_Type_Derived_From_Controlled_Along_Some_With_Chain ; end record ; end A_Package ; Without having passed anything like this past a compiler, I just don't know if it is legal and gets Ted the ability to instantiate the generic from within a non-library-level scope. > > Unbounded_String may be implemented as a controlled type. It's > implementation is not defined, so compiler writers may use any tricks > they think necessary, but you could write the implementation in plain > Ada. > The spec in the appendix does not indicate a "with Ada.Finalization;" anywhere I can see, so it isn't clear how they intended for it to be done. That's why I was wondering how they dealt with assignment if, for example, one were to want Unbounded_String to be implemented with some version of dynamic allocation. MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution e-Mail: marin.condic@pacemicro.com Web: http://www.mcondic.com/