From: Yukihiro Matsumoto Date: 2006-06-26T07:56:12+09:00 Subject: Re: Unicode roadmap? Hi, In message "Re: Unicode roadmap?" on Mon, 26 Jun 2006 05:38:46 +0900, "Charles O Nutter" writes: |When is a ByteArray not a ByteArray? When is a String not a String? Is it |correct to mingle the two concepts perpetually, when they each have fairly |specific definitions? My problem with continuing to treat String as a byte |vector is that it forces two somewhat incompatible concepts on the same |class and the same methods. A string is a sequence of data that can be represented by small integers. Some may want to treat them as CharacterStrings, other may want to treat them ByteStrings. They are not different as you say. On many platforms, a file can contain text data or binary data. Is a chunk of data read from a open file a text, or binary? If you separate ByteArray and (Character) String, you will need to have two separate IO classes, BinaryIO and TextIO, etc. Or you will need explicit conversion from read ByteArray to CharacterString. That makes Ruby programs look a lot like Java programs, which I don't want them to be. One of the good property of Ruby class library is a small number of classes. A class might have multiple roles. For example, a Ruby Array can be treated as Stacks, Queues, etc. And it is a good thing, rather than having separate classes for each role. Why can't Strings be both sequence of text and binary data? matz.