|
Boost : |
Subject: Re: [boost] [string] proposal
From: Matus Chochlik (chochlik_at_[hidden])
Date: 2011-01-27 11:34:58
On Thu, Jan 27, 2011 at 1:52 PM, Dean Michael Berris
<mikhailberis_at_[hidden]> wrote:
> On Thu, Jan 27, 2011 at 8:16 PM, Artyom <artyomtnk_at_[hidden]> wrote:
>>
>> Yes and now it is in Tr1! And if you want string to come
>> to tr1 you need either:
>>
>> 1. Make it fully backward compatible with std::string
>> 2. Call it by different name.
>>
>
> Nope, I disagree with both.
>
> std::string can be deprecated if the standards body agree that there's
> cause for it to be deprecated. And the different name is frankly just
> unnecessary.
Hmm, is the following a dumb idea?
Implement the immutable string.
Implement the old interface for backward compatibility.
Even the things like clear(), at(...) or operator[] could
be implemented by using the new semantics.
Get it into the standard, then deprecate the old interface
and let the users some time to adopt to the new one.
Yes, the things like at(...) would have a terrible performance
which would "force" the people to migrate to the new interface
without actually forcing them (like in: their code would fail to
compile if they didn't).
After enough time has passed the old interface could be
ropped completely.
BR,
Matus
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk