On Tue, Oct 11, 2005 at 11:57:09PM -0400, Gennadiy Rozental wrote: [snip]
I still don't see any good reason to it. String algorithms are primary based on *strings* and not *char type*. A string is first of all a container.
Exactly - they are based on strings, not string iterators. But if we agree that all strings (we are interested to cover with this library) are parameterized by character type we could use char type parameterization
As such thare are several options of its internal representation, none of them superior to other in all possible use cases.
The only reasonble abstraction we have so far is through iterators.
IMO iterator abstraction is unnachural for strings. Unless we are talking about unicode in 99.99% of cases string is just some_template
This is very true. String is realy in most cases some_template
I'm not saying that this is the only possible abstraction, but it has proven adequate.
It's proven implementable not adequate IMO
But I would realy like know what leads you to an idea, that it is not adequate. What is missing and what should be made differently? Can you provide a simple example of an algorithm, that is written your way? Regards, Pavol