Boost logo

Boost :

From: Pavol Droba (droba_at_[hidden])
Date: 2004-05-06 05:39:40


On Thu, May 06, 2004 at 04:33:54AM -0500, Aleksey Gurtovoy wrote:

[snip]
 
> I wasn't suggesting to re-define the standard's Sequence concept to
> mean what we want (although that's not entirely impossible). Rather, I
> was saying that "Collection" is a bad substitute for the occupied
> term.
>

> > I found collection easy to understand. I don't understand what is
> > wrong with it.
>
 
> There is nothing wrong with the word per se. It just has a commonly
> accepted meaning that is in conflict with the definition we are giving
> to the identically named concept. In particular, like I said earlier,
> "Collection" commonly implies storage, while the concept in question
> specifically aims to represent sequences that don't have any.
> Compare, for instance, http://tinyurl.com/32fmb and
> http://tinyurl.com/3h23s.
>
> > It very well fits into the standard concept hierarchy
> >
> > Collection < Container < Sequence
> > < Associative container
>
> Looks like a total mess to me. If anything, it should be
>
> Sequence < Collection < Container
> < Associative Container
> < View
>
>

I don't agree, that sequence is a good candidate for this concept as
you're suggestion. Sequence directlu implies that elements are
sequentialy organized. There are operations that are natural only to
sequences like push_front/back() front/back() pop_front()/back.
There is nothing like front() for map, yet it can be enumarated,

Maybe the best name for the concept should be "Enumerable". That
designates, the primar goal of this conceps, i.e. to be able to
enumerate the elementes of an arbitrary collection/container or
what ever you name it.

Regards,

Pavol


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk