On 2002.07.08, Tom Sawyer <transami / transami.net> wrote: > i don't program in c/c++. I see. From your previous messages, I was lead to believe that you had programmed in C/C++. So, if you don't program in the languages, where does any of your knowledge of these languages come from? > anyway, it dosen't matter. Right. Lets get onto the interesting stuff: > the point is simply that strings are an ordered list of characters. > arrays are order lists of objects. in so far as the two are common, i > want the same methods for both. no suprises. that's all. The difference between strings being an ordered list of characters and arrays being ordered lists of objects is that you're missing a whole dimension relevant to strings and arrays: semantic information. One might say that a String is an Array of Characters, therefore a String ought to inherit all the properties of an Array. But then, adding semantic information to a String, a String is also an Array of Words at the same time. It's also an Array of Sentences and an Array of Paragraphs. Sometimes. Is a String really an Array of Objects? Sure. Is a String more like an Array than like a String (whatever that might be)? Of course not. The point here is that it is a matter of _convenience_ to _human programmers_ to work with Strings as Arrays and therefore a String ought to provide easy ways to coerce Arrays out of Strings. However, to operate under the impression that Strings are nothing more than Arrays with extra accessories is really diminishing the capacity of the object hierarchy's ability to model what Strings really are. -- Dossy -- Dossy Shiobara mail: dossy / panoptic.com Panoptic Computer Network web: http://www.panoptic.com/ "He realized the fastest way to change is to laugh at your own folly -- then you can let go and quickly move on." (p. 70)