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,58bffef5eda29ec X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-03-20 13:01:52 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Clueless :) Date: 20 Mar 2003 21:00:23 +0000 Organization: Pushface Sender: simon@smaug.pushface.org Message-ID: References: NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1048194111 13740 62.49.19.209 (20 Mar 2003 21:01:51 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Thu, 20 Mar 2003 21:01:51 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 Xref: archiver1.google.com comp.lang.ada:35576 Date: 2003-03-20T21:00:23+00:00 List-Id: "Martin Krischik" writes: > On Tue, 18 Mar 2003 13:55:34 +0100, Karel Miklav wrote: > > languages I've seen there is not? And why there are bounded, > > unbounded and dynamic versions of Booch components but no > > polymorphic? Are people really making collections of 30 (the > > number is not important but the last time I made a fixed structure > > it was on C64 long time ago) elements like Simon Wright in his > > Case study? The impetus behind the bounded forms is to avoid memory allocation. Of course, one of the reasons for doing this is because of a need for high dependability (safety-related software, for instance) and I doubt that anyone in such an enviromnent will be using off-the-shelf component libraries. But if you just want to avoid heap fragmentation they can help. > Large collection class librarys usualy have theese options (i.E. IBM > Open Class Library - that C++). They somtetimes have different > namens. The Idea is flexibility against speed. In Booch bounded are > the fastest but as the name suggest not very flexible. Unbouded is > the most flexible. > > 30 elements? Well, I use collections (with IBMs OCL) with up to > 15.000 elements. Important is to use the right collection for you > data and then performace is even with > 10.000 elements quite > aceptable. I suppose I could have used 42 as the example. It's not at all uncommon in embedded systems to know exactly how many of a thing there are going to be. In a recent release of the BCs, the Maximum_Size parameter for the bounded forms is merely the default maximum; you can say Collections.Unconstrained_Collection (Maximum_Size => nnn) to override at runtime. I do take the point that the first thing I show people in the case study ought to be the simplest thing for them to do; that is now done using the (new) Unmanaged form, which doesn't require you to specify a storage manager (and which should work with GNAT 3.12 for those fixed in the past). You might say, wouldn't this new Unmanaged better be called Unbounded, and rename the present Unbounded to Managed? ... well, yes, but the people out there using the BCs wouldn't thank me!