|
Boost : |
From: Jeff Garland (jeff_at_[hidden])
Date: 2006-10-12 13:37:13
loufoque wrote:
> shams wrote:
>> Hi,
>>
>> Sometime ago there was discussion about an "enhanced"
>> Boost.String (super_string) library from Jeff.
>>
>> Has there been any interest in this as-of lately?
>
> Personally I think only a few things are actually useful, and I wouldn't
> want to introduce a new string type just for that.
Why? What would be wrong if we had a plethora of string types (eg: sgi::rope)
to select from to meet our programming needs in different contexts? We have
container types galore -- that's very useful. I think this sort of thinking is
a contributor to a lack of C++ libraries....
> If we had to introduce a new string type, I would prefer it if it didn't
> inherit from the caveats of std::string.
Super string v2 provides an alternative version that extends the proposed
boost::const_string. I did this to mollify the objection that std::string
(actually basic_string) with it's mutable interface was an inappropriate base.
See:
http://www.crystalclearsoftware.com/libraries/super_string/classbasic__const__super__string.html
Honestly though, I think the advantages of using something other than
std::string are minor. The main reason is that std::string is widely used in
existing interfaces and code. So a core goal of the library is that you can
use super_string in some code and then seamlessly pass that instance to
existing interfaces written in terms of std::string for zero cost. So you
don't have to commit to using super_string everywhere, just where you need it.
I actually address that in the FAQ:
http://www.crystalclearsoftware.com/libraries/super_string/index.html#why_basic_string
> Something more flexible might be an interesting base.
Such as? What features would it have that would make it more flexible?
Anyway, it's having to fight this sort of 'generic criticism' that makes me
reluctant to bring the library to review. I have this feeling that we won't
have a true discussion of the interfaces people actually need in a string to
get things done.
Jeff
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk