[m-users.] The new random module(s)

Zoltan Somogyi zoltan.somogyi at runbox.com
Thu Sep 5 20:44:27 AEST 2019

On Thu, 5 Sep 2019 20:14:16 +1000, Mark Brown <mark at mercurylang.org> wrote:
> In my view, the reason to put them in the random module is that they
> are more related to each other, and to the other predicates that do
> random stuff, than they are to predicates that merely work on lists or
> arrays.

That is my opinion as well.

> But no matter, I can add list.random_permutation now unless
> anyone else wants to add their opinion?

I would oppose that. I think everything related to randomness
should be in random.m or its submodules.
> It's not intended that the old and new generators be used in the same
> code. As you say, we need to add predicates to replace
> random.permutation and array.random_permutation to avoid that. I just
> need two names that don't clash with existing names or concepts, then
> I can add the predicates now.
> So what's the choice?
> 1. Add random.permute_* (or whatever) now.
> 2. Add list.random_permutation and make a backwards incompatible
> change to array.random_permutation now.
> 3. Add list.random_permutation now, but wait before changing
> array.random_permutation.

Since I am against both 2 and 3, I prefer 1, though for me
the status quo is also fine :-)


More information about the users mailing list