Extending FileList with CrLf

Andreas Raab andreas.raab at gmx.de
Wed Jul 23 07:44:37 UTC 2003


Daniel,

> [In short - the default encoding should be platform consistent, not
> fixed]
> You think the OS is the platform, I think Squeak is the 
> platform. Not a big difference. Could well be a preference,
> and I wouldn't care very much which was the default. Assuming
> that's all the change we're talking about.
> 
> But this isn't what CrLfFS implements, because CrLf tries to be smart
> when reading files.

I don't get what you're saying. What do you mean by "this" (as in: this
isn't what CLfFS implements) in the above?

> Either way, for the reasons of consistency, if we use the OS 
> convention it must be the policy for reading, as well as writing.
> Streams should not try to "detect" line endings.

Why not? That's just what you were saying is great about Emacs.

> For streams that perform any
> conversion, reading characters that violate the initially assumed
> encoding, whatever it is, should bring up an exception. 
> 
> See my reply to Ned for what I think on "robustness".

With which I strongly disagree. I'll take apart just one of your arguments:

> I emphatically disagree - this would be even worse. Should an image
> reading program, when detecting a corrupted jpeg image, try to interpret
> the rest of it a BMP?

As with many of the arguments you are making in this thread this is wildly
over the top. A more reasonable comparison would be to ask if
ImageReadWriter should try to determine what kind of image file we're giving
it or not. As it turns out, trying to be smart about it is just exactly what
people want. I haven't heard many people complaining about how confusing it
is that ImageReadWriter tries to be smart about it, nor do I see a reason
why people should have to worry about the kind of file they are reading.

Cheers,
  - Andreas



More information about the Squeak-dev mailing list