[m-rev.] for review: io.write for streams
Simon Taylor
staylr at gmail.com
Wed Dec 20 21:07:29 AEDT 2006
On 20-Dec-2006, Julien Fischer <juliensf at csse.unimelb.edu.au> wrote:
>
> On Wed, 20 Dec 2006, Simon Taylor wrote:
> >This might be overkill, it might be better just to have:
> >
> >stream.m
> > stream.char.m write, format, read, read_line, etc.
> > stream.byte.m write_binary, read_binary, etc.
>
> I prefer the latter suggestion, although if the distinction is going
> to be between text and binary streams then the sub-module names ought
> to reflect that, e.g.
>
> stream.m [all the typeclasses]
> stream.text.m write, format, read, read_line, etc.
> stream.binary.m write, read, etc.
The names I gave already give that distinction clearly. stream.char.m
deals with streams of characters. stream.byte.m deals with streams of
bytes. This sets up a naming convention (stream.<type>.m) if we ever
want to create modules to deal with other types of streams.
Also, there may be multiple types of "text" stream, e.g. ASCII and
Unicode.
Simon.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to: mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions: mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the reviews
mailing list