From: ptkwt@...1.aracnet.com (Phil Tomson) Date: 2003-02-25T05:50:37+09:00 Subject: Re: Objectify the mersenne twister in 1.8? In article , Robert Feldt wrote: >Hi, > >Its good news that Ruby 1.7.x and later uses the Mersenne Twister for >rand. However, I feel we should have "taken it all the way" and introduced >a class for RNG's for which MersenneTwister is subclass and rand/srand >are really calls to an instance of a MersenneTwister instance. > >I'd like to know any reasons not to go down that route. The added >complexity would be minimal since the mt algorithm is already in the >interpreter. > >The main benefits imho would be: > >* Multiple different rng streams can be used independently from each other >* Persistence of rng streams by marshalling MT objects >* Conceptually nicer, more oo > This is a good idea. It would also make it easier to 'plug-in' different RNG algoithms for different rng streams. Phil