From: Sean Russell Date: 2002-07-08T13:21:32+09:00 Subject: Re: is there a better string.each? Jim Weirich wrote: > Sean> I don't know of a better definition of "Array" than "an > Sean> ordered set of somethings". > > Technically, arrays aren't sets. An element may appear in an array > more than once. Well, you're right of course. This also means that Strings also aren't, in any sense of the word, sets. > Really? I tend to deal with arrays element by element. With strings, > I usually deal with chunks (i.e. slices) or the entire thing at once. > I usually don't equate a string with an array of characters. They are > different animals in my mind. Hm. I find myself often dealing with Strings character by character, but then again, I do things like write XML parsers. I often take slices of arrays, too. > I think that's part of the problem. Everyone is coming into this with > their own preconceptions of strings and arrays, and they aren't > matching. Yes. I maintain that, lexically, Strings are a series of Characters. I'm not sure how you can get around this; it is true both outside of the world of computers and within it. --- SER