|
Boost Users : |
From: Jeff Garland (jeff_at_[hidden])
Date: 2005-10-12 20:09:28
On Wed, 12 Oct 2005 13:58:10 -0400, Gennadiy Rozental wrote
> "John Maddock" <john_at_[hidden]> wrote in message
> news:01ab01c5cf13$49900270$fc220d52_at_fuji...
> >>> There are already several others (FlexiString, sgi's rope) and
> >>> several are already
> >>
> >> Non of them is standard, so no need to pay attention. Any *string*
> >> class that want conform string_algo interface needs to satisfy
> >> const_string one.
> >
> > And back in the real world users use all kinds of propietory string types:
> > CString, UnicodeString,AnsiString, WideString, need I go on? Users *have*
> > to use these types to interact with their native GUI's and other class
> > libraries, having a string type neutral algorithm library allows them to
> > interact with all of these without copying data all the time. Oh and what
> > about memory mapped files, should we be able to support those as well?
>
> IMO all these non-standard string classes are beside the point. It's
> maybe ok for Boost library to try to accommodate everything. But
> String Algorithms as part of STL should define some specific
> concepts that are expected users string to support and should be
> primarily oriented to work nicely with standard string.
I disagree strongly. Surely it would have been easier to specify Regex for
basic_string only -- but John didn't and the committee accepted. There are
really good why users might not use standard string types and we want to do
the same things to these strings as we do with std strings. Remember the
interface to this library is very natural:
std::string str1("HeLlO WoRld!");
std::to_upper(str1); // str1=="HELLO WORLD!"
MyFancyString str2("HeLlO WoRld!");
std::to_upper(str2); // str2=="HELLO WORLD!"
Makes no sense to me to exclude the later capability...
Jeff
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net