Text in Haskell: A PROPOSAL

Sven Moritz Hallberg pesco@gmx.de
08 Aug 2002 02:30:07 +0200


On Thu, 2002-08-08 at 02:42, Alastair Reid wrote:
> How different is this from the idea of open a file in binary mode and
> in text mode?  I know that Hugs distinguishes the two because I
> remember the case that triggered the requirement: generating MIDI
> files on Win32.
> 
> I guess what I'm saying is do we need new read/write operations or
> just new open operations?

Do we really want different open modes with respect to how the data in
the file is presented to us? I think the whole idea about text/binary
mode is wrong. Reading and interpretation of the data in a file are two
entirely different operations, so sticking one (!) aspect of
interpretation so deeply into the interface for _reading_ a file
scatters the task of interpreting the file and results in confusion.


Sven Moritz