Boost logo

Boost :

From: Jeff Garland (jeff_at_[hidden])
Date: 2006-07-04 18:22:55


David Abrahams wrote:
> Jeff Garland <jeff_at_[hidden]> writes:
>
>> The fact is, if you look around at the languages people are using
>> most for string processing, they offer just as many features as
>> super_string and then some.
>
> Try "python -c help(str)"

Looks like I'm still missing a couple functions ;-) BTW, Is it true that
strings in python are immutable?

>> I understand this flies against the current established C++ wisdom,
>> but that's part of the reason I've done it. After thinking about
>> it, I think the 'wisdom' is wrong. Usability and readability has
>> been lost -- my code is harder to understand. I expect that
>> super_string has little chance of ever making it to Boost because it
>> is goes too radically against some of these deeply held beliefs.
>> That said, I think there's a group of folks out there that agree
>> with me and are afraid to speak up.
>
> Well, let's not make this political before we have to, OK? :)

Fair enough -- it's the reason I've try to explain my position in terms of
code whenever possible.

>> Now they can at least download it from the vault -- but maybe
>> they'll speak up -- we'll see. In any case, it's up to individuals
>> to decide download and use super_string, or continue using their
>> inferior string class ;-)
>>
>>> Even Python's string, which has a *lot* built in, doesn't try to
>>> handle the regex stuff directly.
>> There are plenty of counter examples: Perl,
>
> Not sure that's a good example if you're going for readability; Plus,
> it has special operators that help (and could in principle be
> implemented as free functions).

I thought the c++ was pretty readable. As for free functions, I'm not
opposed, but so far I haven't seen a proposal that makes the code clearer to
my eye.

>> Java, Javascript, and Ruby that build regex directly into the
>> library/language.
>
> Whoa there. Python builds regex directly into the library too. That
> doesn't mean it should be part of the string.
>
> python -c "import sre;help(sre)"

I wasn't trying to suggest that Python didn't support regex. I mostly leave
Python I still haven't written any significant programs in it. One day...

>> It's very powerful and useful in my experience. And, of course,
>> super_string doesn't take away anything, just makes these powerful
>> tools more accessible and easier to use.
>
> I agree with the idea in principle; I just want to scrutinize its
> execution a bit before we all buy into it as proposed ;-)

How does that phrase go...it'll be a cold summer day in Az (a balmy 105 now)
before we 'all' agree ;-)

Jeff


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk