On 6/25/06, Izidor Jerebic <ij.rubylist / gmail.com> wrote: > > On 25.6.2006, at 21:12, Austin Ziegler wrote: > > > On 6/25/06, Izidor Jerebic <ij.rubylist / gmail.com> wrote: > >> If Ruby wants to move forward, it needs transparent String support > >> and > >> hopefully separation of String and ByteArray, since this un- > >> separation brought us code which is mostly wrong (currently most of > >> existing Ruby code breaks if string encoding is honoured, as can be > >> seen from experience of brave people who modified String class). > > > > This is an incorrect and unsupportable statement. It is completely > > unnecessary to separate unencoded (e.g., binary) String support into > > String and ByteArray. > > Well, if it is a byte array, it is not a String (an array of > characters), is it? > > If Ruby would have RegEx operations on byte arrays, there would be no > need for untyped quasi String. API that has two incompatible things > as one class is just plain ugly and wrong. Here you contradict yourself. Regexes are string (character) operations, and you want them on byte arrays. So the concepts aren't really separate. Similarily, when you read part of a file, and use it to determine what kind of file it was you do not want to convert that part into another class or re-read it because somebody decided String and ByteVector are separate. Plus this has been already mentioned here. Michal