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, LOTS_OF_MONEY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fdc75443ea18fb32 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-29 07:40:05 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!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: Standard Queue status Date: Thu, 29 Nov 2001 10:23:29 -0500 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: <9u5jtj$r1d$1@nh.pace.co.uk> References: <%QRM7.39743$xS6.65958@www.newsranger.com> <9u0qhb$pq5$1@nh.pace.co.uk> <9u0ujd$rhg$1@nh.pace.co.uk> <9u3jdb$2i9$1@nh.pace.co.uk> <9u3lth$uic$1@news.huji.ac.il> NNTP-Posting-Host: dhcp-200-133.miami.pace.co.uk X-Trace: nh.pace.co.uk 1007047411 27693 136.170.200.133 (29 Nov 2001 15:23:31 GMT) X-Complaints-To: newsmaster@news.cam.pace.co.uk NNTP-Posting-Date: 29 Nov 2001 15:23:31 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:17166 Date: 2001-11-29T15:23:31+00:00 List-Id: What about this: package Unbounded_Arrays is type Array_Type is private ; --etc... end Unbounded_Arrays ; package Unbounded_Lists is type List_Type is private ; -- etc... end Unbounded_Lists ; with Unbounded_Arrays ; package Unbounded_Lists.Lesser_Used_Operations is function To_Unbounded_List ( Item : in Unbounded_Arrays.Array_Type) return List_Type ; end Unbounded_Lists.Less_Used_Operations ; This has a variety of advantages. The package Unbounded_Lists supplies just the basic plain-vanilla operations one needs for a list, so it isn't a burden for the simple cases. There might be a whole variety of other similar conversions one might want to perform - such as changing Maps into Lists or Trees into Lists - we don't yet know what all of the possible abstract types are that we might want to build or what sort of conversions would be desirable. We are also likely to discover a large variety of lesser-used-yet-still-useful operations that we might want to bundle up somehwere and have available - a child package seems like the proper place for all this potential baggage. Want a simple list? Use Unbounded_Lists. Want to perform conversions between all of our standard components? Grab Unbounded_Lists.Conversions and go through a few complicated gyrations to get it to work. Want to compute statistics on your list data? Bring in Unbounded_Lists.Statistics. Want some clever-but-obscure list operations? Bring in Unbounded_Lists.Tenebrous. Defering to child packages lets us initially concentrate on the really fundamental stuff first & leave the rest for later. I have not given much thought as to how to deal with the instantiations - it does look like a kind of double-inheritance. However, we could probably come up with something that stalled the operations off to a child package. (Unbounded arrays become a descendent of unbounded lists? Gen-Spec relationship?) 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/ "Ted Dennison" wrote in message news:IPrN7.42250$xS6.70888@www.newsranger.com... > > The issue is wheather to provide for converting between them and lists. Note > that Ada.Strings.Unbounded does this exact same thing for Strings and > Unbounded_String's. The only real difference is that the String type already > exists, whereas the unbounded array type would have to be declared in the > package. >