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,1d52a75fd633fefc X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-02-22 09:56:04 PST Path: supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!newsfeed.cwix.com!sjc-peer.news.verio.net!news.verio.net!sea-read.news.verio.net.POSTED!not-for-mail Newsgroups: comp.lang.ada From: Brian Rogoff Subject: Re: STL for Ada (was: Re: Ada to C++ translator?) In-Reply-To: <87itm31237.fsf@520075220525-0001.dialin.t-online.de> Message-ID: References: <3A844255.24A4DBA3@lmco.com> <968vnc$5a2$1@nnrp1.deja.com> <3A8C6843.B46006D6@lmco.com> <3A93C0DC.37A37955@baesystems.com> <3a93e3b9$1@pull.gecm.com> <3A93E9A9.21F2F44F@baesystems.com> <3A946DC7.84502F14@votehere.net> <87itm31237.fsf@520075220525-0001.dialin.t-online.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Date: Thu, 22 Feb 2001 17:55:04 GMT NNTP-Posting-Host: 206.184.139.136 X-Complaints-To: abuse@verio.net X-Trace: sea-read.news.verio.net 982864504 206.184.139.136 (Thu, 22 Feb 2001 17:55:04 GMT) NNTP-Posting-Date: Thu, 22 Feb 2001 17:55:04 GMT Organization: Verio Xref: supernews.google.com comp.lang.ada:5444 Date: 2001-02-22T17:55:04+00:00 List-Id: On 22 Feb 2001, Stefan Nobis wrote: > Andrew Berg writes: > > > Having said that, I think that I would kick and scream before giving up > > the STL now that I've gotten used to it. It is not so much that it is > > that good, rather it is just that much better. > > I'm very new to Ada (but worked quite some time with C++) and 'till now i read > nothing about something like the STL for Ada. Is there a library that gives > Ada all the things the STL gives C++? There's no way you'll get "all" of the things you get in the STL, since Ada lacks automatic instantiation of generics. One of the nice things about the STL is the way you can change implementations of collections and you can get away with changing very little source code. That's partly due to automatic instantiation of generic subprograms. > If not, why? STL is mostly generic programmic and Ada always claims to > do better generics than C++, so why not put such a lib in the standard? Ada does generics differently. An "all generic" library like STL is possible in Ada, you can do the same tricks of creating an iterator interface to a set of predefined collection signatures. You bang into a few Ada issues. One of the more vexing is the issue of whether to make collections a Controlled type and "inherit" all of the limitations of Controlled (tagged) types. There should probably be some standard data structure libraries, but I suspect that in demanding applications you'll write your own anyways. -- Brian