default random object?

Derek Parnell derek at psych.ward
Fri Feb 13 19:26:12 PST 2009


On Fri, 13 Feb 2009 17:10:29 -0800, Andrei Alexandrescu wrote:


> 1. Are you cool with making the rng the last parameter and give it a 
> default value?

Yes
 
> 2. The global random generator will be allocated per thread. Are you 
> cool with this too?

Yes
 
> 3. How should the global rng be initialized? To always generate the same 
> sequence, or not?

New sequence each time. A predetermined sequence should be under the
application's control and be explicit, IMHO.
 
> 4. While we're at it, should uniform(a, b) generate by default something 
> in [a, b] or [a, b)? 

I prefer [a,b] as the default, and I'm thinking integers too. 

-- 
Derek Parnell
Melbourne, Australia
skype: derek.j.parnell



More information about the Digitalmars-d mailing list