Boost logo

Boost :

Subject: Re: [boost] [string] proposal
From: David Bergman (David.Bergman_at_[hidden])
Date: 2011-01-27 13:14:51


On Jan 27, 2011, at 10:13 AM, Sebastian Redl wrote:

>
> On 27.01.2011, at 04:54, Dean Michael Berris wrote:
>>
>> I just prefer calling a spade a spade and not say `string` when I
>> really mean a `view<encoding>` -- because largely I think everyone
>> would agree that the string data structure really doesn't have an
>> intrinsic property that relates to an 'encoding'.
>
> The string data structure that I learned about in some obscure algorithm lectures in university and the thing that's represented by the type 'string' or some spelling variation of it in most programming language are really not the same thing. In particular, the latter is a type meant to store text, whereas the former is a sequence of something.
>
> That makes for a huge difference in my mind.

Please don't go there ;-) Yes, we all (?) know what "string" means computer-scientifically, a finite sequence of symbols, where the symbols are chosen from some alphabet. But note the *symbol* here; i.e., even in computer science, a *string* is not supposed to contain *anything*, but rather symbols. So, the actual manifestations in programming languages often *do* cover that notion quite precisely, often with an alphabet that coincides or extends one used for everyday written communication between people. What programming languages do, in addition, is to add "text handling" capabilities *on top of* the core (CS...) string.

I assume we are talking about both these layers in our "boost::string" discussion, and that we have one (or one out of seven) alphabet in mind for the underlying (CS) string.

Do you think we should go computer-scientific on "std::string"'s ass? And make sure it behaves as CS string and nothing else? :-)

Diving deeper into the meta semantics of "symbol" would lead us too OT...

/David


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