From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2006-07-04 13:46:01
Jeff Garland wrote:
> Thorsten Ottosen wrote:
>>Jeff Garland wrote:
>>>I've been working on a little project where I've had to doing lots of string
>>>processing, so I decided to put together a string type that wraps up
>>>boost.regex and boost.string_algo into a string type. I also remember a
>>>discussion in the LWG about whether the various string algorithms should be
>>>built in or not -- well consider this a test -- personally I find it easier
>>>built into the string than as standalone functions.
>>It might be slightly easier to use at first, but it goes directly
> It doesn't stop being easier to use -- it's the same every day. Your implicit
> implication is that later on I'm going to find a bunch of extra functions that
> I can't perform with super_string. True enough. At that point I either add
> it to super_string or write it using the functional interface. No big deal.
My implicit implication was that soon you'll feel comfortable with the
In php, there is not a single member functions in a string, and all
string processing is done with free-standing functions. In general I
find strings in php easy to work with:
>>Not a good idea IMO.
> We disagree, obviously, and that's fine. Just to save some time, I'm pretty
> sure it's impossible to convince me that range or something else is going to
> solve my set of issues.
Probably not. I did not have that I mind. I think some extensions to
range will make stuff like regexes easier, but it would give you "one
place for all string processing".
> I'll just point out, that some of this was a result of recent brushes of mine
> with other languages. I've been doing some coding lately in, gasp, Java and
> with the manual for these languages and in 15 minutes whip up some fancy
> string parsing code using regular expressions, etc. It's all very nice and
> neat. Go to the string reference page -- see the list of functions and boom,
> you're in business. So it gets me thinking, why is it that C++ makes this so
> hard? Well, std::string isn't as capable as Java's string. Of course, C++
> (with Boost) has all of the same capabilities, but it takes a truckload of
> documentation and a masters degree to figure it all out. And then it's a pain
> in the neck to use and read the code. This is my attempt to rectify that.
If the problem is bad documentation/tutorials, then I think we should
fix that instead.
For Java, many many people have been paid to write the documentation,
whereas for boost, we have to do it our spare-time. It's pretty good
most of the time anyway.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk