Hi --

On Sat, 6 Jul 2002, Tobias Reif wrote:

> so it's still
>
>   String < Array
>
> A string is an array of characters which are arrays of bytes.
>
> No?

If you literally mean that String should be understood as inheriting
all the methods from Array, then I think this is too rigid a picture.
I'm thinking of some of the functionalities which are complementary as
between arrays and strings -- pack/unpack, join/split -- and also
#flatten comes to mind as an array method whose equivalent for strings
isn't clear.

I've always thought that strings are basically arrays but merit
certain kinds of special treatment, extra methods, optimizations
(syntax as well as speed), etc., because they are so common that it's
worth trading off some consistency (in their treatment as arrays) to
make them easier to handle.


David

-- 
David Alan Black
home: dblack / candle.superlink.net
work: blackdav / shu.edu
Web:  http://pirate.shu.edu/~blackdav