Two things.

We have seen many times (last was Matt Harden) such definitions :

> > class RandomGen g where
> >    next :: g -> (Int, g)
> >    split :: g -> (g, g)
> >    genRange :: g -> (Int, Int)
> >    genRange _ = (minBound, maxBound)

Do you always use integer random numbers?

I don't know about you, but in my milieu 99% of random number
applications need *real*, floating RN, as fast as possible. If
the Haskell standard libraries offer only the basic integer RNG,
which will force all the users to reconstruct the needed reals,
this is not extremely painful, but anyway.
I would love having 'next' returning reals as well...
And vectors (with decently uncorrelated elements). Etc.

Do you think that all that must be manufactured by the user, or
can one parameterize the R. Gen. class a bit differently?

==

I haven't follow this discussion since the beginning, so I might
try to break an open door. The question is the following: would it
be a bad idea to provide a 'randomize' primitive, generating an
unexpected random value based on the internal clock or other
system properties? I haven't seen that here. It *is* useful.

Jerzy Karczmarczuk
Caen, France

Reply via email to