[m-rev.] for review: io.write for streams

Julien Fischer juliensf at csse.unimelb.edu.au
Wed Dec 20 11:57:37 AEDT 2006


On Tue, 19 Dec 2006, Simon Taylor wrote:

> On 19-Dec-2006, Julien Fischer <juliensf at csse.unimelb.edu.au> wrote:
>>
>> On Fri, 15 Dec 2006, Simon Taylor wrote:
>>
>>> Implement io.write for arbitrary streams.  With type specialization
>>> this is only slightly slower than the original.
>>>
>>> library/stream.string_writer.m:
>>> 	A module containing predicates for writing to streams
>>> 	which accept strings.
>>
>> Is there a reason that you are putting these predicates in a sub-module of
>> stream.m rather than just in stream.m itself?  Also, I'm not crazy about the
>> name string_writer, it sounds like a set of predicates for contructing
>> strings.  At the moment, I guess my preference would be to just add
>> everything to stream.m.
>
> That leads to 8000 line modules like io.m.  If there is a sensible set
> of functionality that can be split out, it's better to do it.

Suggestions abut how to decompose the io module are welcome as well :-)

> I'm open to suggestion on the name, maybe stream.put_string.

How about stream.output_util?  I don't see that there's any point having
a separate sub-module for string writers at the moment.  (By the same
token the various folds over input streams that are currently in the
stream module could be moved to stream.input_util sub-module.)

Alternative name suggestions: stream.writer_util or stream.writers.

Julien.
--------------------------------------------------------------------------
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