About Strings

Stephan Bergmann sbergman at redhat.com
Tue Mar 20 08:09:40 PDT 2012


On 03/20/2012 03:29 PM, Caolán McNamara wrote:
> On Tue, 2012-03-20 at 15:20 +0100, Lubos Lunak wrote:
>> On Tuesday 20 of March 2012, Caolán McNamara wrote:
>>> On Mon, 2012-03-19 at 13:39 +0100, Stephan Bergmann wrote:
>>>> (And even if immutable classes are
>>>> generally also a good idea in C++, esp. in combination with
>>>> multi-threading, the mutable rtl::OUString::operator= spoils this,
>>>> anyway.)
>>>
>>> And the += operator irritates me.
>>
>>   Before I start experimenting with more stuff in OUString that might look a
>> bit like operator+= , what exactly is so irritating about operator= or
>> operator+= in OUString and why?
>
> It's just that if OUString was supposed to be immutable, then a
> foo += bar; "feels wrong" to me in some vague way that, I guess
> bizarrely, foo = foo + bar doesn't. *shrug*

To me, both look equally wrong if OUString is considered immutable, and 
equally OK if it isn't.

Stephan


More information about the LibreOffice mailing list