Boost logo

Boost :

Subject: Re: [boost] [string] proposal
From: Chad Nelson (chad.thecomfychair_at_[hidden])
Date: 2011-01-27 09:05:44


On Thu, 27 Jan 2011 19:22:17 +0800
Dean Michael Berris <mikhailberis_at_[hidden]> wrote:

> <emphasis>
> If you were to ask *me* and *me alone*, of course *I* think that *my*
> vision for boost::string *should* be the way strings are dealt with.
> Of course that's ego-maniacal and self-centered of me to say so, but
> if I had to be explicit about it and take a position I would say
> exactly that: std::string is broken and it doesn't deserve to be the
> string implementation that C++ programmers have to use.
> </emphasis>

Question: if you replaced std::string with your immutable string, how
would you build strings one character at a time for it?
std::back_inserter wouldn't be possible. A large number of current uses
for std::string require that, all the way up to std::copy. Building
them in an array or vector<char> would be less efficient due to an
extra copy.

I'm not objecting to the basic idea -- you made an excellent case for
it in the message this is a reply to, and it convinced me. I just can't
see any way that it could replace mutable strings, as you're asserting.

> So why would I not want to call it boost::string? ;)

Because it isn't a string, in the accepted C++ sense? :-)

-- 
Chad Nelson
Oak Circle Software, Inc.
*
*
*



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