comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: Clueless :)
Date: 20 Mar 2003 21:00:23 +0000
Date: 2003-03-20T21:00:23+00:00	[thread overview]
Message-ID: <x7vfzphycrc.fsf@smaug.pushface.org> (raw)
In-Reply-To: pan.2003.03.18.16.37.01.729269@T-Online.de

"Martin Krischik" <Martin.Krischik@T-Online.de> 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!



  reply	other threads:[~2003-03-20 21:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-18 12:55 Clueless :) Karel Miklav
2003-03-18 16:37 ` Martin Krischik
2003-03-20 21:00   ` Simon Wright [this message]
2003-03-21  7:39     ` Karel Miklav
2003-03-21  8:34     ` Karel Miklav
2003-03-21  9:26     ` Karel Miklav
2003-03-21 18:01       ` Simon Wright
2003-03-18 20:42 ` Matthew Heaney
2003-03-19  6:43   ` Karel Miklav
2003-03-19  2:21 ` Jeffrey Carter
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox