>  In general I would say that you should write either something platform
specific or you write something specific

Except that I cannot do that because the system doesn't support neither.
And the fact that the default line ending is CR is just bullshit… it's
2016, not 1986.

On Thu, May 26, 2016 at 12:37 PM, Sven Van Caekenberghe <s...@stfx.eu>
wrote:

> MultiByteFileStream is terrible (too complex) because it does too much (at
> once). Let's keep WriteStream simple (and even simplify it). You do not
> want characters that change magically.
>
> That being said, line end conventions can be a pain. In general I would
> say that you should write either something platform specific (you can fetch
> the EOL terminator somewhere), or you write something specific (say CRLF
> for web stuff), while during reading you should accept anything (that is
> easy to do). You know: be strict in what you produce, liberal in what you
> accept.
>
> > On 26 May 2016, at 11:39, Peter Uhnák <i.uh...@gmail.com> wrote:
> >
> > Is there a reason why only MultiByteFileStream provides
> lineEndConvention: and not WriteStream?
> >
> > The problem is that if I use MemoryStore in tests it breaks, because
> DiskStore and MemoryStore return different write streams.
> >
> > '/tmp/test.txt' asFileReference writeStream ==> "MultiByteFileStream:
> '/tmp/test.txt'".
> > (FileSystem memory / 'test.txt') writeStream ==> "a WriteStream"
> >
> > Can we either:
> >
> > a) have `lineEndConvention:` directly in the WriteStream, or
> > b) have MemoryStore return MultiByteFileStream, or
> > c) both?
> >
> > Thanks,
> > Peter
>
>
>

Reply via email to