Boost logo

Boost :

Subject: Re: [boost] [string] proposal
From: Dean Michael Berris (mikhailberis_at_[hidden])
Date: 2011-01-28 06:20:07

On Fri, Jan 28, 2011 at 6:29 PM, Matus Chochlik <chochlik_at_[hidden]> wrote:
> On Fri, Jan 28, 2011 at 11:20 AM, Yakov Galka <ybungalobill_at_[hidden]> wrote:
>>> Why not just call it boost::rope then? Its implementation will be a rope
>> (almost certainly) and no-body here has to remain compatible with SGI.
> I believe that some people might object to that. The original rope
> has a different interface than Dean proposes.

Rope is not bad, it's actually shorter than 'chain'.

I don't remember though whether the SGI rope implementation implied
immutability. I know it uses concatenation trees of immutable
substrings and substring operations rely on maintaining a reference to
the original string. Somehow though I think it exposes a similar API
to std::string and thus had to compete with it in terms of
"mutability" by creating new chunks copying the modified chunks into
new storage (and re-creating the concatenation tree). It also had some
balancing algorithms implemented which I think could be addressed in a
different manner.

So the interface I was thinking about (and suggesting) is a lot more
minimal than what rope or std::string have exposed. I think when I do
finish that design document (with rationale) it would be clear why I
would like to keep it immutable and why I would prefer it still be
called a string.

Let me finish that document -- expect something over the weekend. :)

Dean Michael Berris

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