Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-10-10 18:56:19


----- Original Message -----
From: "Peter Dimov" <pdimov_at_[hidden]>

> From: "David Abrahams" <david.abrahams_at_[hidden]>
> > From: "Peter Dimov" <pdimov_at_[hidden]>
> >
> > > moreover, the whole concept of
> > > Iterator::value_type becomes redundant - you can use typeof(*it) to
> > > determine it.
> >
> > Unless we allow proxy references ;-)
>
> Oh yes, proxy references. vector<bool>. Database containers.
Distinguishing
> reads from writes. Copy on write.
>
> Do you think that this can be made to work?

Absolutely.

> I'm somewhat on the pessimistic
> side. We have something - the STL containers/iterators - that works, more
or
> less, and solves real problems. Trying to evolve the ultimate data view
> model from it may not be worth the effort.

Well, that's a different question, isn't it?

Personally, I think it is worth the effort to evolve it at least a little.
When Jeremy and I worked on the Iterator Adaptor library we kept finding
places where we had to make pessimistic assumptions about underlying
iterators that compromised functionality (e.g. operator[] has to return
by-value). A better system of concepts for iterators, which separated
traversal from data access, would have helped a lot. Also, if we could find
a place in the framework for vector<bool>::iterator, we'd be able to fix the
standard so that algorithms would behave predictably with vector<bool>
(since vendors don't seem willing to pull the vector<bool> specialization
out of the standard).

BTW, I don't think "STL containers" works, at least not in the generic
sense. I know of no significant and successful libraries that treat
containers generically; do you?

===================================================
  David Abrahams, C++ library designer for hire
 resume: http://users.rcn.com/abrahams/resume.html

        C++ Booster (http://www.boost.org)
          email: david.abrahams_at_[hidden]
===================================================


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