Re: std::string bad design????
bestbrain@gmail.com wrote:
<Quote Ref: http://www.cantrip.org/realworld.html?seenIEPage=1 >
The C++ Standard Library offers both good examples (iterators,
algorithms, and containers) and bad (string)
</Quote>
Note that this is just one person's opinion. I find it very
hard, for example, to consider the STL iterators an example of
good design.
With regards to string, I think there is more or less a
consensus that it is not particularly good design. As you can
see from the earlier postings, however, there is no real
consensus as to why. Part of the reason string is like it is is
precisely because there was no consensus concerning what should
be changed.
Note that we now have concrete experience with all of this,
which wasn't the case before, and our opinions have likely
changed as a result of that experience. As it turns out, the
iterators and the algorithms are a lot harder to use than what
was claimed. And curiously enough, although it certainly won't
win any prizes for elegance (and I still don't really like it),
string (and the other containers) has turned out to be quite
usable.
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orient?e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S?mard, 78210 St.-Cyr-l'?cole, France, +33 (0)1 30 23 00 34
--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]