openFile and text mode vs. binary mode

David Roundy droundy@abridgegame.org
Wed, 18 Jun 2003 07:35:43 -0400


On Wed, Jun 18, 2003 at 09:37:11AM +0100, Simon Marlow wrote:
>  
> > On Tue, Jun 10, 2003 at 10:33:53AM +0100, Simon Marlow wrote:
> > > The question is: is this the interface that we want to expose from
> > > System.IO?  Personally I have two criticisms: openFileEx is not a
> > > particularly descriptive name, and I don't see a reason for 
> > IOMode to be
> > > nested inside IOModeEx.  So I'd suggest this instead:
> > > 
> > >     openBinaryFile :: FilePath -> IOMode -> IO Handle
> > 
> > Perhaps openFileAs? openBinaryFile sounds a bit like it would 
> > only open it
> > as a binary, whereas in fact it actually gives you the option 
> > of opening it
> > either as binary or as text.
> 
> Well, my intention was that openBinaryFile would open the file as
> binary, and the ordinary openFile would open it in text mode.  That is,
> we would get rid of the IOModeEx type.

Oh, I obviously misread it.  In that case openBinaryFile sounds good.
-- 
David Roundy
http://www.abridgegame.org