> > > How about ImmutableString?
> > > cu
> > > Peter
> > Sure, fine, but that's not what I am proposing. A string index is basically the address of a char buffer and its operational length, along with some functions for doing common string operations such as compare, test for empty, return substring and return next token. It would probably have to be templated on the char type so you can have char, unsigned char, wide characters etc.
> Yep, that was clear but basically, string objects that use this buffer are immutable, so there are no append or other modifying operations on such objects.
> I just like it better because the name StringIndex describes the implementation behind while ImmutableString describes a property of the String class but that's a matter of taste.
> Just see it as one more name you can choose from :-)
I'm definitely no Java expert, even less a fan. I am a bigmouth however ;-) , hence allow me to try to summarize this. If I get it right, the following is being proposed:
Java StringBuffer => Poco std::string
Java String => Poco ImmutableString
I vote for name ImmutableString.
Naming indeed is partially a taste issue, neverteless an important one - class name should be pronouncable and clearly indicate what the object is (rather than what it does). So, Andrew your idea obviously is a legitimate one, but IMO your choice of name was not the best.
Another aspect to think about (not in this thread, though) is the size of Foundation. It has been noted that Foundation is already quite big and should not significantly grow in future. Some strategy/place for things like ImmutableString may be a valid topic for discussion.