Squeak 3.4: should we change to CrLfFileStream as default?

Tim Rowledge tim at sumeru.stanford.edu
Sun Nov 17 02:06:34 UTC 2002


Ned Konz <ned at bike-nomad.com> is claimed by the authorities to have written:

> There is often discussion here about line-ending related problems.

Consider changing the approach a little; instead of creating a stream
object and telling it to be #binary or #ascii and then worrying about
conversion overhead etc, how about selecting from the proper concrete
subclasses at creation time? FileStream binary fileNamed:.... etc? Yes,
it would involve changing some user code but then I suspect any decent
answer would.

Alternatively making different varieties of buffer might do the trick -
a BinaryStreamBuffer would do no conversion, a CrLFStreamBuffer would.
That would avoid the above class side change. Install the proper kind of
buffer per the platform and #binary/#ascii message.

tim
-- 
Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
Strange OpCodes: TCP: Terminate Control Program




More information about the Squeak-dev mailing list