[m-dev.] for review: extra modes for random.m

Peter Schachte schachte at cs.mu.OZ.AU
Thu Mar 1 01:58:45 AEDT 2001


On Thu, Mar 01, 2001 at 01:42:53AM +1100, Fergus Henderson wrote:
> On 28-Feb-2001, Ralph Becket <rbeck at microsoft.com> wrote:
> > 
> > library/random.m:
> >         Added support for in/out random__supply arguments to
> >         complement the existing mdi/muo modes.
> 
> I suggested this change a while back, but Tom Conway wasn't keen.
> His argument was that the mdi/muo modes provided extra safety,

I think Tom's right.  I can think of only two reasons for using a
non-[m]di/[m]uo mode:  (1) because you for some reason want the same
sequence of random numbers in two places in your code; and (2) because the
incompleteness of the uniqueness system makes it too painful to live with
the existing modes, so you'd rather lose the checking.  I don't think (1) is
a good reason for the change because I doubt it would come up very often,
and it can be handled other ways.  The problem with reason (2) is that when
the uniqueness system is eventually fixed, you'll want to take away the new
modes to get back the checking, but this will break people's code.

What you really need is a way to thread more than one pair of hidden
arguments through a program ;-).

-- 
Peter Schachte <schachte at cs.mu.OZ.AU>  It isn't pollution that's harming the
http://www.cs.mu.oz.au/~schachte/      environment. It's the impurities in
Phone:  +61 3 8344 9166                our air and water that are doing it.
Fax:    +61 3 9348 1184                    -- Vice President Dan Quayle 
--------------------------------------------------------------------------
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