From: David Abrahams (dave_at_[hidden])
Date: 2006-07-06 12:51:53
"Peter Dimov" <pdimov_at_[hidden]> writes:
> Jody Hagins wrote:
>> On Thu, 06 Jul 2006 11:08:12 +0200
>> Martin Wille <mw8329_at_[hidden]> wrote:
>>> IMHO, the ongoing discussion highlights some fundamental disagreement
>>> on what a string is/should be. There's an immutable string with free
>>> functions group and a fat-interface string group. Either approach
>>> looks wrong to me when taken alone.
>> I think you just nailed my thoughts, but I incorrectly aimed them at
>> "prefer immutable."
>> I tend to lean toward the side of providing flexible SAFE interfaces,
>> rather than restricting them. I'm not against immutable. I am
>> against providing ONLY immutable interfaces.
> Don't most of the advantages of immutability (representation sharing in its
> various forms, especially in the presence of multiple threads) disappear
> when you provide mutable accessors as well?
Yes. I think the idea is that you have an immutable string for most
purposes, and some sort of mutable "string creation buffer" that
allows time-critical processing to occur in a different context.
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk