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,8eff44ec1bcf8433 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-18 14:01:05 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!chcgil2-snf1.gtei.net!news.gtei.net!news.huji.ac.il!not-for-mail From: "Ehud Lamm" Newsgroups: comp.lang.ada Subject: Re: Container reqs Date: Thu, 18 Oct 2001 22:52:48 +0200 Organization: The Hebrew University of Jerusalem Message-ID: <9qnflg$pm$1@news.huji.ac.il> References: <9qctpn$lil$1@news.huji.ac.il> <3nCy7.29644$ev2.35903@www.newsranger.com> <9qfgla$7sb$3@news.huji.ac.il> NNTP-Posting-Host: di2-42.dialin.huji.ac.il X-Trace: news.huji.ac.il 1003438578 822 132.64.12.42 (18 Oct 2001 20:56:18 GMT) X-Complaints-To: abuse@news.huji.ac.il NNTP-Posting-Date: Thu, 18 Oct 2001 20:56:18 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2014.211 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 Xref: archiver1.google.com comp.lang.ada:14919 Date: 2001-10-18T22:52:48+02:00 List-Id: Simon Wright wrote in message news:x7v4royhk79.fsf@smaug.pushface.org... > "Ehud Lamm" writes: > > > The way I see it, if it is impossible - or just very hard - to > > provide default instantiaions, it is likely that the design is bad > > anyway. > > I don't see how you can provide containers that can contain anything > at all in Ada. > > You could have containers that were capable of handling anything in > Containable_Object'Class, I guess (but you'd need access types, 'Class > is unconstrained). I guess we are talking different things here. I have no problem with a Queue package paraemtrized by an Element type (specified as private). Even novice Ada programmer must know how to instantiate such packages if he uses Text_IO. What I dodn't like is the need for several, possibly nested, instantiations simply to get a simple queue or hash table. Ehud