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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,effb80d4bb7716dd X-Google-Attributes: gid103376,public From: Corey Minyard Subject: Re: Wanted: Ada STL. Reward: Ada's Future Date: 1999/02/05 Message-ID: #1/1 X-Deja-AN: 441032659 Sender: minyard@wf-rch.cirr.com References: <790f4q$3l@bgtnsc01.worldnet.att.net> Organization: Wonderforce Research Reply-To: minyard@acm.org Newsgroups: comp.lang.ada Date: 1999-02-05T00:00:00+00:00 List-Id: I've stayed out of this fray for a while, but I thought I would throw in my 2 cents. "Alexy V Khrabrov" writes: > > Greetings -- > > I'm assembling a case for Ada for teaching at the University of Pennsylvania > in Philadelphia. I compare Ada to Java, currently used here as the main > vehicle for teaching various programming disciplines. Ben and Mike already > provided helpful presentation support, and Tuck promised to share his > theoretical and empirical knowledge of Ada versus Java in > cross-implementation and action. Now, I'd like to ask all of you to > evaluate the status of reusable software for Ada, and first and foremost, an > analog of a standard library with basic data structures. The main reference > point is C++ STL. I'm very concerned there's nothing near in Ada. And yet > the main purpose of Ada is to facilitate software reuse! > > In a comparative assessment of programming languages, the state of existing > reusable components is paramount. Yet for Ada, it's rather dreadful. There are many useful reusable components for Ada. There is the Booch components, for instance. I have written a set of components, too, which can not come into general usage since they will compile with gnat-3.11p :-), but not gnat-3.10p :-(. > > Consider this simple task: a set. In C++, you get it from the STL. How do > you get one in Ada? I looked very strongly at the STL as a model when I was writing my components. I gave up on it after a while. IMHO, it is too focused (low-level) and not general enough to be useful. For instance, you mention sets. Well, any container is technically either a set (no duplicates) or a bag (allows duplicates). So when I wrote my containers, I created general set/bag operations that work on any container type. Of course, efficiency varies with container type, you would probably want to use the hash table or btree, but there is nothing that prevents someone from doing a set/bag operation on a list, for instance. The STL seemed very inflexible on storage management, too. Not a lot of options. > > There seems to be no central library equivalent to STL. I looked at HBAP, > and it turns out many links there are dangling -- to PAL for instance. > There's a passage diminishing STL, yet there should be a clear guide how to > find a complete replacement of all the necessary pieces of STL. All serious > people program with C++ and STL. If they turn to Ada, a replacement to STL > is like the first gulp of water they need for a break. I do agree that it would be nice if the Ada community would standardize on a set of reusable components, but better ones than the STL. Maybe we could come up with a standards committee for this? Maybe not, those things take forever :-). > Can you please share your thoughts on the status of an Ada STL? (Let's code > name it Ada STL for the purpose of discussion.) Is there anything close for > Ada 95? What are YOU guys using for your Ada programming? I can't believe > each of you has a jar with homegrown sets, linked lists, and queues, all > implemented differently! OK, let's start small. Can you please tell me > with as more URLs as possible, what exactly you use when you need > > 1. Linked lists > 2. Trees > 3. Queues > 4. Sets > > I feel Sets are the litmus tests for an Ada STL. Where do you guys get > sets? > It's very important to assess the situation, and I hope to hear from you > with as much detail as your busy schedules permit. My components have all of these (and a lot more). You can get them at http://www.concentric.net/~Minyard. Comments are welcome. -- Corey Minyard Internet: minyard@acm.org Work: minyard@nortelnetworks.com UUCP: minyard@wf-rch.cirr.com