[m-dev.] Stream2000

Peter Ross peter.ross at miscrit.be
Fri Nov 17 02:07:02 AEDT 2000


On Wed, Nov 15, 2000 at 08:54:13PM +1100, Fergus Henderson wrote:
> > % File: impure.m.
> > % Main author: petdr
> > % Stability: exceptionally low.
> > %
> > % An impure interface for describing streams.
> 
> See my review comments from last time around, in
> <http://hydra.cs.mu.oz.au/mailing-lists/mercury-developers/mercury-developers.0010/0009.html>.
> 
> In particular:
> 
> 	I would much prefer to have a pure stream.lowlevel.m that
> 	provides everything that stream.impure.m provides except the
> 	impurity.  I wouldn't mind having stream.impure.m so long as
> 	stream.lowlevel.m is there, but I object to having
> 	stream.impure.m in the public interface without
> 	stream.lowlevel.m being there, since it would encourage people
> 	to make unnecessary use of impurity.
> 
> I am not inclined to compromise on that one ;-)
> 
Having a pure lowlevel interface would require that you add io__state
pairs.  This then requires that you make all the typeclass methods det
and thus would require returning an extra argument which is whether or
not the operation succeded, at which point I believe that the actual
interface would differ only slightly from the highlevel interface in
stream.m and hence not worth implementing.

Long live impurity! ;)

Pete
--------------------------------------------------------------------------
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