Boost logo

Boost :

Subject: Re: [boost] [string] proposal
From: David Bergman (David.Bergman_at_[hidden])
Date: 2011-01-24 00:41:26

On Jan 24, 2011, at 12:13 AM, Dean Michael Berris wrote:

> On Mon, Jan 24, 2011 at 11:51 AM, David Bergman
> <David.Bergman_at_[hidden]> wrote:
>> On Jan 23, 2011, at 9:34 PM, Dean Michael Berris wrote:
>>> I think I disagree with this. A string is by definition a sequence of
>>> something -- a string of integers, a string of events, a string of
>>> characters. Encoding is not an intrinsic property of a string.
>> Ok... it feels like you are changing the rules as we play, instead of admitting "defeat" ;-)
>> Or, did you indeed talk about *generic sequences* this whole time? If so, why the focus on encoding strategies for characters?
> Huh?

Why did you suddenly mention string as being an alias for what we usually denote a 'sequence' (of which std::vector is a model, by the way)?

> I've always been pointing out that strings should just be immutable
> and agnostic of the encoding and have the encoding enforced externally
> to the string.
> Are you confusing me for someone else?

No, not at all. There were two - for me - pretty awkward statements made by you, indicating a lack of coherence:

1. Your answer regarding what you meant by 'smarter iterator', which was a tautology adding no information at all:

        "The way I was thinking about it, "smarter" would mean something along
the lines of "knows more than your average <thing>" where <thing> is a
bare iterator."

        Yes, that touches at the definition of 'smarter'... but surely you understand that we (or he...) wondered *in what way* it was smarter; you *did* in fact extend a little bit on that later, I can give you that...

2. Your sudden proclamation that a string is a sequence of anything; indicating that you have been talking about a new sequence concept (variant) all this time, capable of holding stuff that are quite distinct from characters.

        Yes, ok, that is one meaning of 'string' in a strict sense, yes, but (I hope it was clear) that it is not the meaning used in this specific discussion; so, that switch of interpretation of the term does probably not make the discussion more focused.

> My assertion has been from the beginning:
> 1. Let's focus on a string class first that is (arguably) better than
> std::string by making it efficient, immutable, and does proper value
> semantics.
> 2. Once we have this then let's build upon it to allow for multiple
> ways of interpreting the *contents* of the string.
> I'm inclined to think you're confusing me for someone else while
> replying to my message above.

No, I did not. Sorry. By what you said above, you also add this point, which de-coheres the picture quite a bit:

3. This string class should be able to manifest sequences of anything, including events or arbitrary objects.


Boost list run by bdawes at, gregod at, cpdaniel at, john at