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-23 02:41:39 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!212.74.64.35!colt.net!newspeer.clara.net!news.clara.net!peer.news.eu-x.com!server2.netnews.ja.net!newshost.central.susx.ac.uk!news.bton.ac.uk!not-for-mail From: John English Newsgroups: comp.lang.ada Subject: Re: Container reqs Date: Tue, 23 Oct 2001 09:17:44 +0100 Organization: University of Brighton Message-ID: <3BD527A8.93C1F68B@brighton.ac.uk> References: <9qctpn$lil$1@news.huji.ac.il> <3BCA86C7.BB252751@acm.org> <%jYy7.31350$ev2.37672@www.newsranger.com> <3BCD7C50.647ADBD0@brighton.ac.uk> <9qk44b$utk$1@news.huji.ac.il> NNTP-Posting-Host: pc2je.it.bton.ac.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: saturn.bton.ac.uk 1003826846 7566 193.62.183.154 (23 Oct 2001 08:47:26 GMT) X-Complaints-To: news@bton.ac.uk NNTP-Posting-Date: 23 Oct 2001 08:47:26 GMT X-Mailer: Mozilla 4.7 [en-gb] (Win95; U) X-Accept-Language: en Xref: archiver1.google.com comp.lang.ada:15067 Date: 2001-10-23T08:47:26+00:00 List-Id: Ehud Lamm wrote: > > John English wrote in message > news:3BCD7C50.647ADBD0@brighton.ac.uk... > > Hmm, the STL doesn't use inheritance, it's all done with templates. > > Tagged types probably aren't needed at all (other than as derivations > > of controlled). And you can use tricks to get around the library-level > > problem, e.g. have a library-level parent package which defines a private > > controlled type and generic children which make use of those controlled > > objects as components in other composite types... > > Don't you like using inheritance as for interface reuse? > I like the ability to have all sequential structures support the same > iteration mechanisms. I like the ability to write class-wide opertations > ("Exists", "For_All", "Filter" etc.) Yes; but if you *want* to avoid inheritance, the STL is an existence proof for a possible solution... :-) OTOH, if you do want to use inheritance here, some trickery is probably needed to avoid the library-level problem (since you'll presumably want generic packages but don't want to force library-level instantiation). ----------------------------------------------------------------- John English | mailto:je@brighton.ac.uk Senior Lecturer | http://www.comp.it.bton.ac.uk/je Dept. of Computing | ** NON-PROFIT CD FOR CS STUDENTS ** University of Brighton | -- see http://burks.bton.ac.uk -----------------------------------------------------------------