Boost logo

Boost :

From: Pavol Droba (droba_at_[hidden])
Date: 2004-05-05 07:44:47

On Wed, May 05, 2004 at 06:35:31AM -0500, Aleksey Gurtovoy wrote:
> Pavol Droba writes:
> > On Wed, May 05, 2004 at 09:10:48AM +0800, Joel de Guzman wrote:
> > > John Torjo wrote:
> > >
> > > >Hi Thorsten,
> > > >
> > > >about the name of the library:
> > > >Not sure why it's called collection traits, since IMO it should better
> > > >be called either sequence traits, container traits, range traits or
> > > >array traits.
> > >
> > > I agree. I think sequence traits is most appropriate.
> > >
> > You are not quite right. Sequence concept is precisely defined in C++ standard.
> Yes, and that's unfortunate, because it is essentially a dead concept -- "nobody"
> writes generic code that relies on it -- that has occupied a good name. In fact,
> "Collection" is exactly the word that would perfectly fit to describe what the
> standard choose to refer to as "Sequence". I don't think going the other way
> around would be a good call. In CS terminology, collections are inherently
> associated with storage; using the term to name the concept that explicitly aims
> at representing sequences that do not necessarily have any is IMO a bad idea.
> > Collection traits are not implementig this concept, they don't even implement
> > full Container concept. So if would be very misleading to use the name of it.
> > Collection traits are working with structures that model Collection concept,
> > therfore they should be named after it IMHO.
> "Collection" is an unfortunate name for the concept. Not having "Sequence" at our
> disposal, it should be called "Iterator Range" or something along these lines.
Well I cannot judge the standard naming, however I think, that some standardization
is better then none. So if there is a definition we should change the standard of
stick to it. Later is probably more feasible.

I found collection easy to understand. I don't understand what is wrong with it.
It very well fits into the standard concept hierarchy

Collection < Container < Sequence
                       < Associative container

Unlike container, that have an ownership of its elements, collection might be
just a reference to values. So it describes a "collection" of values organized
in an arbitrary structure. Collection concept specifies an interface to
access these values.



Boost list run by bdawes at, gregod at, cpdaniel at, john at