[Haskell] System.Random

Jerzy Karczmarczuk karczma at info.unicaen.fr
Tue Mar 2 13:47:45 EST 2004

Simon Marlow wrote:
>>why is the Random module situated under System?  Wouldn't 
>>something like Data be more adequate?
> There is usually an external source of randomness, which is why the
> library in placed in System rather than Data.  A purely functional
> random library would be rather less useful...

Now, I don't understand this at all...

All the development of the Random stuff in all languages has nothing
of random whatsoever. Perhaps *some* people like to seed the generator
with the clock time, but most *real* developers *known to me* usually choose
the seed deterministically, in order to reproduce the sequence, until
the program is ready to run in the end-user environment.

Anyway, conceptually, the behaviour of random generators is very far from
any "external source of randomness", so the question 'why "System"' for
me remains valid. The module Random might of course use Time or similar
entities for the randomization/initialization, but this is a contingency.

Jerzy Karczmarczuk

More information about the Haskell mailing list