Squeak 3.4: should we change to CrLfFileStream as default?

Ned Konz ned at bike-nomad.com
Sun Nov 17 17:07:57 UTC 2002


On Saturday 16 November 2002 06:06 pm, Tim Rowledge wrote:
> 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.

The change set I'm working on does just this. It adds binaryFileNamed: 
etc to FileStream class and FileDirectory. However (as you note) 
there are lots of changes that need to be made (over 100).

The scheme I'm using is this:

CrLF:
* HTML (i.e. PWS)
* Log files, traces, etc.
* Mail messages saved to disk

Binary:
* Squeak file-outs
* everything else

> 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

I think that Flow or Michael's work might hold a similar answer. I'm 
postponing my work until I see them.

-- 
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE




More information about the Squeak-dev mailing list