[m-dev.] io streams

Michael Day mcda at cat.cs.mu.OZ.AU
Thu Dec 23 20:20:53 AEDT 1999


> What is the rationale for making stream__read_chars a type class
> method rather than just a polymorphic predicate that calls
> stream__reach_char to read in each character?  Is it for efficiency
> reasons?
> 
> Ditto for stream__write_chars.

A buffered stream only requires write_char and read_char, but I have not
yet clarified whether and how buffering will be exposed in the stream
interface. An unbuffered stream would be quite inefficient with only
per-character operations.

Hmm. Ah well, time to think about buffering I guess :)

Michael

--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list