[m-dev.] for review: extra modes for random.m
Thomas Conway
conway at cs.mu.OZ.AU
Thu Mar 1 09:55:44 AEDT 2001
On Thu, Mar 01, 2001 at 03:11:32AM EST, Ralph Becket wrote:
> (1) seems perfectly legitimate to me - there's nothing in that code that
> *requires* mostly-uniqueness; those modes are partly there as a common case
> sanity check for the unwary programmer (not a bad thing, mind you).
However, as peter pointed out, there are ways around this - ie copy/2.
It is true that you might want to duplicate random number supplies,
bit it is the exception, not the rule, so putting in a call to copy/2
occasionally, and getting error messages if you get your variable
numbering wrong seems like a good idea. Which brings us back to (2)....
> p.s. Thanks to an e-mail problem, I checked in the change before I
> got to see your response. I hope it doesn't get backed out because
> I need it to work.
There are various places that I've come up against this problem, and
usually, rather than breaking the interfaces, I insert calls to a
wrapper function which is just an inst cast, which I can change to a
no-op when the mode checker does the right thing.
--
Thomas Conway )O+
<conway at cs.mu.oz.au> 499 User error! Replace user, and press any key.
--------------------------------------------------------------------------
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