Monticello: any reason to write .mcv files with CR line endings?

Daniel Vainsencher danielv at netvision.net.il
Thu Jul 24 22:12:39 UTC 2003


Words from the Line Ending Bigot:

Using CrLfFileStream (or any other format) doesn't make *an application*
a bad citizen even in my eyes. If you *know* a file will always be
written/read by applications that can handle either format, there is no
problem. OTOH, if you want your files to be read by other applications
without them having to guess what line ending encoding you use, you
might want to set them to CRs after all. Either choice is legitimate for
an application to make, regardless of my obvious biases.

Of course, until we change the FileList to display files with
alternative line endings schemes conviniently, having varied line
endings might be a small inconvinience sometimes.

For the same reason, I don't think its a good idea for just some users of 
Monticello to use CrLfFileStream - they would be distributing badly 
formatted files that not everyone else can read. Again, this should be 
an application level decision.

What I object to is the definition of CrLfFS as a *system default* for
applications to use *implicitly*.

Daniel

Avi Bryant <avi at beta4.com> wrote:
> 
> On Thu, 24 Jul 2003, Ned Konz wrote:
> 
> > Since there shouldn't be any problems reading in .mcv files regardless
> > of line endings, wouldn't it make sense to use a MCFile rather than a
> > StandardFileStream to file them out? You'd then have new files
> > written in the native format, and maintain line endings on others.
> 
> MCFile had a somewhat more complicated purpose - to make sure that
> you write out a new version of a file with the same line endings that it
> had when you read it in.
> 
> .mcv files are immutable - you don't write out a new version of the same
> file, you write out a new file.  So this requirement doesn't apply.
> 
> If what you want is for .mcv files to have native line endings, you could
> just read/write them with CrLfFileStream instead of StandardFileStream.
> This is a somewhat contentious issue, though, as recent threads have
> shown.  My general feeling is that Monticello should be a good Squeak
> citizen in this regard and use whatever is set as the #concreteStream;
> anyone doing a grep etc from the command line (which is the only time this
> would really matter, emacs + co. do fine with CR) is probably savvy enough
> to pass the file through a CR->LF filter first anyway.
> 
> Avi



More information about the Squeak-dev mailing list