Extending FileList with CrLf

Daniel Vainsencher danielv at netvision.net.il
Mon Jul 21 10:33:01 UTC 2003


[Using CrLf by default]
I strongly disagree. How files are interpreted, at any level, should not
be a system wide decision made by low level streaming classes. It should
be an application level decision.

IMO, the fact that CrLfStream tries to be quite subtle about what it
does is a point against as a default, though it might be useful for 
a specific user or application. The default behavior should be simple 
and transparent.

Daniel

Lex Spoon <lex at cc.gatech.edu> wrote:
> Volker Nitsch <nitsch-lists at netcologne.de> wrote:
> > Am Freitag, 18. Juli 2003 18:22 schrieb Ned Konz:
> > > On Friday 18 July 2003 09:12 am, Volker Nitsch wrote:
> > > > Hacking a bit in FileList to use CrLFileStream.:
> > > >
> > > > FileList opens its files with FileDirectory.
> > > > Currently i clone oldFileOrNoneNamed:etc as
> > > > oldCrLfFileOrNoneNamed: etc. is this the right way?
> > >
> > > No need to do this (see below).
> > >
> > > > Also i subclass FileList as CrLfFileList. would some flag or such
> > > > in FileList itself be better?
> > >
> > > We already have one. See FileStream class>>concreteStream and its
> > > callers.
> > >
> > > Have you just tried changing FileStream class>>concreteStream to:
> > >
> > 
> > Yes, in a squeak-try a while ago. Caould be 3.2? 
> > Something broke IIRC, thinking files are binary.
> > A comment indicated concreteStream will change to use it.
> > This did not happen till today, so i guest there are to many problems.
> > 
> > So i want a FileList explicitly using CrLfFileStream without affecting the 
> > rest.
> > 
> 
> If you want to explicitly avoid CrLfFileStream, you can simply open your
> file in binary mode.  That's what binary mode is: it means that you are
> directly accessing the bytes in the file.
> 
> That said, I've been using CrLfFileStream for years and am not seeing
> very many problems in my own image.  So how about you just go for it?
> 
> 
> I think it's just inertia that keeps StandardFileStream as the standard.
>  Not many people know about it or use it.  It would be great if this got
> changed, though....  If people are only avoiding it because of the
> possibility of bugs, then let's switch over and get the bugs fixed!  It
> would simplify Squeak and remove a useless preference.
> 
> 
> Lex



More information about the Squeak-dev mailing list