From: "Hal E. Fulton" Date: 2002-07-08T05:07:29+09:00 Subject: Re: is there a better string.each? ----- Original Message ----- From: "Tom Sawyer" To: "ruby-talk ML" Sent: Sunday, July 07, 2002 3:00 PM Subject: Re: is there a better string.each? > no that is not right. > > first of all, a linked list is not simply an array. a linked list holds > both an object and a link in reference to the next object in the list > (at the very least). an array is no more then an ordered collection of > objects. so a linked list is not an array. a linked list is different > kind of data structure from an array (an ordered list). I never said a linked list was an array. I said that, like an array (and a string), it is an ordered collection. A string could be implemented as an array. It could also be implemented as a linked list. > but even so, your statement would still be invalid because even if a > linked list were a type of array, it would not mean a string were a > linked list. this is what i was trying to point out with cat - parrot > anology. while, a cat is an animal, and a parrot is an animal, a cat is > NOT a parrot. Which is precisely the fallacy of your "string is an array" argument. You were saying: "An array is an ordered collection. A string is an ordered collection. Therefore, a string is an array."